0.0.2 • Published 1 year ago

@leonetti/array-first-ts v0.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

Get first n elements using TypeScript

Get first n elements using TypeScript.

Install

npm install @leonetti/array-first-ts

Usage

import {arrayFirst} from '@leonetti/array-first-ts';

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

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

1 year ago

0.0.1

1 year ago