r3-v2/node_modules/array-initial
Theunis J. Botha 5f5bbac56e initial comit 2020-02-27 15:24:35 +01:00
..
node_modules/is-number initial comit 2020-02-27 15:24:35 +01:00
.jshintrc initial comit 2020-02-27 15:24:35 +01:00
.npmignore initial comit 2020-02-27 15:24:35 +01:00
.travis.yml initial comit 2020-02-27 15:24:35 +01:00
LICENSE-MIT initial comit 2020-02-27 15:24:35 +01:00
README.md initial comit 2020-02-27 15:24:35 +01:00
index.js initial comit 2020-02-27 15:24:35 +01:00
package.json initial comit 2020-02-27 15:24:35 +01:00

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.