All Projects → jonschlinkert → array-last

jonschlinkert / array-last

Licence: MIT license
Return the last element in an array. Faster than `.slice`

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to array-last

repeat-element
Create an array by repeating the given string n times.
Stars: ✭ 19 (-44.12%)
Mutual labels:  array, element
longest
Get the length of the longest item in an array.
Stars: ✭ 31 (-8.82%)
Mutual labels:  array, element
base-elements
A selection of configurable native DOM UI elements
Stars: ✭ 41 (+20.59%)
Mutual labels:  element
vue2-all-test
vue2 vue-router vuex axios 全家桶
Stars: ✭ 40 (+17.65%)
Mutual labels:  element
RuoYi-Vue-Oracle
🎉 (RuoYi)官方仓库 基于SpringBoot,Spring Security,JWT,Vue & Element 的前后端分离权限管理系统
Stars: ✭ 225 (+561.76%)
Mutual labels:  element
vue-next-admin
🎉🎉🔥基于vue3.x 、Typescript、vite、Element plus等,适配手机、平板、pc 的后台开源免费模板库(vue2.x请切换vue-prev-admin分支)
Stars: ✭ 1,002 (+2847.06%)
Mutual labels:  element
all-about-node
All about Node.js
Stars: ✭ 16 (-52.94%)
Mutual labels:  array
RuoYi-Cloud-Vue3
🎉 基于Spring Boot、Spring Cloud & Alibaba、Vue3 & Vite、Element Plus的分布式前后端分离微服务架构权限管理系统
Stars: ✭ 295 (+767.65%)
Mutual labels:  element
mask export
Export your mask elements as extension
Stars: ✭ 45 (+32.35%)
Mutual labels:  element
ready
Detect element availability on the initial page load and those dynamically appended to the DOM
Stars: ✭ 77 (+126.47%)
Mutual labels:  element
xml-to-array
A simple class to convert an xml to array
Stars: ✭ 30 (-11.76%)
Mutual labels:  array
slimarray
SlimArray compresses uint32 into several bits, by using a polynomial to describe overall trend of an array.
Stars: ✭ 39 (+14.71%)
Mutual labels:  array
angular-datetime-inputs
📅 Angular directives for datetime inputs
Stars: ✭ 20 (-41.18%)
Mutual labels:  element
signin-with-matrix
Federated sign-in component for your web app (using Matrix)
Stars: ✭ 207 (+508.82%)
Mutual labels:  element
Data-Structure-Algorithm-Programs
This Repo consists of Data structures and Algorithms
Stars: ✭ 464 (+1264.71%)
Mutual labels:  array
Lattice2
FreeCAD workbench about arrays of all sorts and kinds, and local coordinate systems
Stars: ✭ 40 (+17.65%)
Mutual labels:  array
data-structure-project
自己实现集合框架系列整理总结
Stars: ✭ 29 (-14.71%)
Mutual labels:  array
js-deep-sort-object
Simple module to sort objects recursively by its keys
Stars: ✭ 19 (-44.12%)
Mutual labels:  array
DS ALGO
Data Structures and algorithms
Stars: ✭ 20 (-41.18%)
Mutual labels:  array
arr-sort
🎉 多重条件下的数组排序方法
Stars: ✭ 20 (-41.18%)
Mutual labels:  array

array-last NPM version NPM monthly downloads NPM total downloads Linux Build Status

Get the last or last n elements in an array.

Please consider following this project's author, Jon Schlinkert, and consider starring the project to show your ❤️ and support.

Install

Install with npm:

$ npm install --save array-last

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']

About

Contributing

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

Running Tests

Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:

$ npm install && npm test
Building docs

(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)

To generate the readme, run the following command:

$ npm install -g verbose/verb#dev verb-generate-readme && verb

Related projects

You might also be interested in these projects:

  • arr-union: Combines a list of arrays, returning a single array with unique values, using strict equality… more | homepage
  • array-unique: Remove duplicate values from an array. Fastest ES5 implementation. | homepage
  • array-xor: Returns the symmetric difference (exclusive-or) of an array of elements (elements that are present in… more | homepage

Contributors

Commits Contributor
19 jonschlinkert
3 SpyMaster356
2 bendrucker
2 phated

Author

Jon Schlinkert

License

Copyright © 2017, Jon Schlinkert. Released under the MIT License.


This file was generated by verb-generate-readme, v0.6.0, on November 30, 2017.

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].