array-grouper-twig
TypeScript icon, indicating that this package has built-in type declarations

1.0.10 • Public • Published

Array Grouper

Array Grouper splits a given array of numbers into N smaller arrays where the length of the array and N are both positive integers.

Installation

npm i array-grouper-twig

Usage

In order to use this array grouper, simply import the groupArrayElements method and call it as shown below.

import { groupArrayElements } from "array-grouper-twig";

var result = groupArrayElements([1, 2, 3, 4, 5], 3);
//result = [ [ 1, 2], [ 3, 4 ], [ 5 ] ]

Readme

Keywords

none

Package Sidebar

Install

npm i array-grouper-twig

Weekly Downloads

5

Version

1.0.10

License

ISC

Unpacked Size

8.93 kB

Total Files

14

Last publish

Collaborators

  • ryanfindlayy