|
|
%!s(int64=2) %!d(string=hai) anos | |
|---|---|---|
| .. | ||
| node_modules | %!s(int64=2) %!d(string=hai) anos | |
| .jshintrc | %!s(int64=2) %!d(string=hai) anos | |
| .npmignore | %!s(int64=2) %!d(string=hai) anos | |
| .travis.yml | %!s(int64=2) %!d(string=hai) anos | |
| LICENSE-MIT | %!s(int64=2) %!d(string=hai) anos | |
| README.md | %!s(int64=2) %!d(string=hai) anos | |
| index.js | %!s(int64=2) %!d(string=hai) anos | |
| package.json | %!s(int64=2) %!d(string=hai) anos | |
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.