Big update!Introducing GitHub Bot Commands. Learn more
Socket
Log inBook a demo

array-initial

Package Overview
Dependencies
2
Maintainers
3
Versions
3
Issues
File Explorer

Advanced tools

array-initial

Get all but the last element or last n elements of an array.

    1.1.0latest

Version published
Maintainers
3
Weekly downloads
1,270,948
increased by13.82%

Weekly downloads

Readme

Source

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.

Keywords

FAQs

What is array-initial?

Get all but the last element or last n elements of an array.

Is array-initial popular?

The npm package array-initial receives a total of 1,021,320 weekly downloads. As such, array-initial popularity was classified as popular.

Is array-initial well maintained?

We found that array-initial demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.It has 3 open source maintainers collaborating on the project.

Last updated on 05 Dec 2017

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc