@zodash/nth
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

@zodash/nth

Gets the element at index n of array. If n is negative, the nth element from the end is returned.

Usage

import { nth } from '@zodash/nth';

nth([1, 2, 3]);
// => 1
 
nth([]);
// => undefined

Package Sidebar

Install

npm i @zodash/nth

Weekly Downloads

2

Version

0.0.3

License

MIT

Unpacked Size

3.69 kB

Total Files

6

Last publish

Collaborators

  • uniquecolesmith