Socket
Book a DemoInstallSign in
Socket

array-first

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

array-first

Get the first element or first n elements of an array.

Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
30
114.29%
Maintainers
1
Weekly downloads
 
Created
Source

array-first NPM version

Get the first element or first n elements of an array.

Install

Install with npm:

npm i array-first --save-dev

Usage

var last = require('array-last');

last(['a', 'b', 'c', 'd', 'e', 'f']);
//=> 'f'

last(['a', 'b', 'c', 'd', 'e', 'f'], 1);
//=> 'f'

last(['a', 'b', 'c', 'd', 'e', 'f'], 3);
//=> ['d', 'e', 'f']

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

array

FAQs

Package last updated on 12 Dec 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts