@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
@zodash/nth
Gets the element at index n of array. If n is negative, the nth element from the end is returned.
import { nth } from '@zodash/nth';
nth([1, 2, 3]);
// => 1
nth([]);
// => undefined
npm i @zodash/nth
2
0.0.3
MIT
3.69 kB
6