Get unlimited public & private packages + team-based management with npm Teams.Learn more »

just-last

2.1.0 • Public • Published

just-last

Part of a library of zero-dependency npm modules that do just do one thing.
Guilt-free utilities for every occasion.

Try it now

import last from 'just-last';
 
last([1, 2, 3, 4, 5]); // 5
last([{a: 1}, {b: 1}, {c: 1}]); // {c: 1}
last([true, false, [true, false]]); // [true, false]
last(); // undefined
last([]); // undefined
last(null); // undefined
last(undefined); // undefined

Install

npm i just-last

DownloadsWeekly Downloads

167

Version

2.1.0

License

MIT

Unpacked Size

2.33 kB

Total Files

4

Last publish

Collaborators

  • avatar