All Projects → jonschlinkert → Array First

jonschlinkert / Array First

Licence: mit
Get the first element or first n elements of an array.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Array First

Structurae
Data structures for high-performance JavaScript applications.
Stars: ✭ 323 (+5283.33%)
Mutual labels:  array
Laravel Helpers
An extensive set of Laravel framework helper functions and collection macros.
Stars: ✭ 407 (+6683.33%)
Mutual labels:  array
Deep Object Diff
Deep diffs two objects, including nested structures of arrays and objects, and returns the difference. ❄️
Stars: ✭ 515 (+8483.33%)
Mutual labels:  array
Massiv
Efficient Haskell Arrays featuring Parallel computation
Stars: ✭ 328 (+5366.67%)
Mutual labels:  array
Hashmap
HashMap JavaScript class for Node.js and the browser. The keys can be anything and won't be stringified
Stars: ✭ 363 (+5950%)
Mutual labels:  array
Algodeck
An Open-Source Collection of 200+ Algorithmic Flash Cards to Help you Preparing your Algorithm & Data Structure Interview 💯
Stars: ✭ 4,441 (+73916.67%)
Mutual labels:  array
Kind Of
Get the native JavaScript type of a value, fast. Used by superstruct, micromatch and many others!
Stars: ✭ 268 (+4366.67%)
Mutual labels:  array
Array To Xml
A simple class to convert an array to xml
Stars: ✭ 744 (+12300%)
Mutual labels:  array
Loopy
A code generator for array-based code on CPUs and GPUs
Stars: ✭ 367 (+6016.67%)
Mutual labels:  array
Android interviews
🚀Everything you need to know to find a android job. 算法 / 面试题 / Android 知识点 🔥🔥🔥 总结不易,你的 star 是我最大的动力!
Stars: ✭ 510 (+8400%)
Mutual labels:  array
Morphism
⚡ Type-safe data transformer for JavaScript, TypeScript & Node.js.
Stars: ✭ 336 (+5500%)
Mutual labels:  array
Arrayy
🗃 Array manipulation library for PHP, called Arrayy!
Stars: ✭ 363 (+5950%)
Mutual labels:  array
Netfabric.hyperlinq
High performance LINQ implementation with minimal heap allocations. Supports enumerables, async enumerables, arrays and Span<T>.
Stars: ✭ 479 (+7883.33%)
Mutual labels:  array
Mlib
Library of generic and type safe containers in pure C language (C99 or C11) for a wide collection of container (comparable to the C++ STL).
Stars: ✭ 321 (+5250%)
Mutual labels:  array
Moses
Utility library for functional programming in Lua
Stars: ✭ 541 (+8916.67%)
Mutual labels:  array
Interview Questions In Javascript
A mostly reasonable collection of technical software development interview questions solved in Javascript
Stars: ✭ 3,268 (+54366.67%)
Mutual labels:  array
Negative Array
Negative array index support `array[-1]` using ES2015 Proxy
Stars: ✭ 420 (+6900%)
Mutual labels:  array
Pyopencl
OpenCL integration for Python, plus shiny features
Stars: ✭ 790 (+13066.67%)
Mutual labels:  array
Leetcode
Provide all my solutions and explanations in Chinese for all the Leetcode coding problems.
Stars: ✭ 5,619 (+93550%)
Mutual labels:  array
Collection
A PHP library for representing and manipulating collections.
Stars: ✭ 488 (+8033.33%)
Mutual labels:  array

array-first NPM version Build Status

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

(TOC generated by verb using markdown-toc)

Usage

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

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

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

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

Related projects

array-last: Get the last or last n elements in an array. | homepage

Running tests

Install dev dependencies:

$ npm i -d && npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Author

Jon Schlinkert

License

Copyright © 2016 Jon Schlinkert Released under the MIT license.


This file was generated by verb on January 12, 2016.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].