Current collected state Current
Observed since 20 Oct, 19:09 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Transform a 1d array into a 2d array
Transform a 1d array into a 2d array
npm install 2d-array --save
var create2dArray = require('2d-array')
console.log(create2dArray([ 1, 2, 3, 4, 5, 6 ], 2))
// -> [ [ 1, 2 ], [ 3, 4 ], [ 5, 6 ] ]
console.log(create2dArray([ 1, 2, 3, 4], 2, 2))
// -> [ [ 1 ], [ 2, 3 ] ]
var array = create2dArray(array, n[, ignore])Options must include:
array - an array to transform into a 2d array.n - the number of items to be inside each array. Non-numbers (undefined, null, ''), Non-floats or strings that represent anything other than one number will return an empty array.Download counts and popularity will appear here as the collector receives them.
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 19:09 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:e3265551e6370670aef95cf5e4d7fd1813f1050454d640480fad4f4b369ad670