Current collected state Current
Observed since 20 Oct, 19:09 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
2d-array
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.
| Package / target | Requirement | Relationship |
|---|---|---|
istanbulEnvironment{
"local_name": "istanbul",
"alias": false,
"peer_metadata": null
} | ^0.3.22 | development |
jscsEnvironment{
"local_name": "jscs",
"alias": false,
"peer_metadata": null
} | ^2.3.0 | development |
jshintEnvironment{
"local_name": "jshint",
"alias": false,
"peer_metadata": null
} | ^2.8.0 | development |
mochaEnvironment{
"local_name": "mocha",
"alias": false,
"peer_metadata": null
} | ^2.3.3 | development |
Source distribution
{
"shasum": "176cb88653b846715f1534440d549182083f61b0",
"tarball": "https://registry.npmjs.org/2d-array/-/2d-array-1.0.0.tgz",
"integrity": "sha512-NWz9DJ+a02sHLYOWQ0CHZ4dy0CRFdgIu2wntqZQzFufvIXp260qpoKLs92X21hZBR8k6eV8pnx8zUslmNP76ng==",
"signatures": [
{
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
"sig": "MEYCIQCkPBog5TkNvCutsMilB2aJ5I5b4P959kkA3YLlESawlgIhAPcsOquaB8GxK18le+Omn1szss1qKFgVbnGfNW3FT+EN"
}
]
}Observed since 20 Oct, 19:09 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:c9b44ebcc3cd685ac6edc2aa123f01b7d6d280b4d95b3fb8cf12c78e63535c99