Skip to content

Instantly share code, notes, and snippets.

@ragmha
Created December 23, 2018 12:46
Show Gist options
  • Save ragmha/3e061ed5f9c8be01a66deb83c2007355 to your computer and use it in GitHub Desktop.
Save ragmha/3e061ed5f9c8be01a66deb83c2007355 to your computer and use it in GitHub Desktop.
WIP: utility funcs
const getItems = (count) =>
Array.from({ length: count }, (v, k) => k)
.map(k => ({ id: `items-${k}`, content: `item ${k}`}));
console.log(getItems(10))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment