Vitalik 89ad36e769 add base style 1 mese fa
..
node_modules 89ad36e769 add base style 1 mese fa
.jshintrc 89ad36e769 add base style 1 mese fa
.npmignore 89ad36e769 add base style 1 mese fa
.travis.yml 89ad36e769 add base style 1 mese fa
LICENSE-MIT 89ad36e769 add base style 1 mese fa
README.md 89ad36e769 add base style 1 mese fa
index.js 89ad36e769 add base style 1 mese fa
package.json 89ad36e769 add base style 1 mese fa

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.