陈鹏铭 3283bca5a2 1 před 6 měsíci
..
node_modules fe36a53a7d 首次提交 před 6 měsíci
.jshintrc fe36a53a7d 首次提交 před 6 měsíci
.npmignore fe36a53a7d 首次提交 před 6 měsíci
.travis.yml fe36a53a7d 首次提交 před 6 měsíci
LICENSE-MIT fe36a53a7d 首次提交 před 6 měsíci
README.md 3283bca5a2 1 před 6 měsíci
index.js fe36a53a7d 首次提交 před 6 měsíci
package.json fe36a53a7d 首次提交 před 6 měsíci

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.