|
|
před 2 roky | |
|---|---|---|
| .. | ||
| node_modules | před 2 roky | |
| .jshintrc | před 2 roky | |
| .npmignore | před 2 roky | |
| .travis.yml | před 2 roky | |
| LICENSE-MIT | před 2 roky | |
| README.md | před 2 roky | |
| index.js | před 2 roky | |
| package.json | před 2 roky | |
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.