root 3bf41bf355 update | vor 1 Jahr | |
---|---|---|
.. | ||
node_modules | vor 1 Jahr | |
.jshintrc | vor 1 Jahr | |
.npmignore | vor 1 Jahr | |
.travis.yml | vor 1 Jahr | |
LICENSE-MIT | vor 1 Jahr | |
README.md | vor 1 Jahr | |
index.js | vor 1 Jahr | |
package.json | vor 1 Jahr |
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
.