.. | |||
node_modules/ is-number | 16 days ago | ||
.jshintrc | 16 days ago | ||
.npmignore | 16 days ago | ||
.travis.yml | 16 days ago | ||
LICENSE-MIT | 16 days ago | ||
README.md | 16 days ago | ||
index.js | 16 days ago | ||
package.json | 16 days ago |
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
.