sensordb2 e64a8defe5 3.17 | 1 年之前 | |
---|---|---|
.. | ||
node_modules | 1 年之前 | |
.jshintrc | 1 年之前 | |
.npmignore | 1 年之前 | |
.travis.yml | 1 年之前 | |
LICENSE-MIT | 1 年之前 | |
README.md | 1 年之前 | |
index.js | 1 年之前 | |
package.json | 1 年之前 |
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
.