vmk-demo-bot / admin / node_modules / array-initial /
..
node_modules/ is-number init 16 days ago
.jshintrc init 16 days ago
.npmignore init 16 days ago
.travis.yml init 16 days ago
LICENSE-MIT init 16 days ago
README.md init 16 days ago
index.js init 16 days ago
package.json init 16 days ago
README.md

array-initial NPM version

Get all but the last element or last n elements of an array.

Install with npm

npm i array-initial --save

Usage

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']

Author

Jon Schlinkert

License

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.