Skip to content

Instantly share code, notes, and snippets.

@tarlepp
Created May 30, 2017 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tarlepp/842007db8c73241f1bb9f49f5a11d13e to your computer and use it in GitHub Desktop.
Save tarlepp/842007db8c73241f1bb9f49f5a11d13e to your computer and use it in GitHub Desktop.
private partitionArray(array: Array<any>, size: number) {
return array.map((e, i) => (i % size === 0) ? array.slice(i, i + size) : null).filter((e) => e);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment