sensordb2 e64a8defe5 3.17 | il y a 1 an | |
---|---|---|
.. | ||
node_modules | il y a 1 an | |
.jshintrc | il y a 1 an | |
.npmignore | il y a 1 an | |
.travis.yml | il y a 1 an | |
LICENSE-MIT | il y a 1 an | |
README.md | il y a 1 an | |
index.js | il y a 1 an | |
package.json | il y a 1 an |
Get all but the last element or last n elements of an array.
npm i array-initial --save
var initial = require('array-initial');
initial(['a', 'b', 'c', 'd', 'e', 'f']);
//=> ['a', 'b', 'c', 'd', 'e']
initial(['a', 'b', 'c', 'd', 'e', 'f'], 1);
//=> ['a', 'b', 'c', 'd', 'e']
initial(['a', 'b', 'c', 'd', 'e', 'f'], 2);
//=> ['a', 'b', 'c', 'd']
Jon Schlinkert
Copyright (c) 2014 Jon Schlinkert
Released under the MIT license
This file was generated by verb on December 12, 2014. To update, run npm i -g verb && verb
.