@leonetti/array-first-ts
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i @leonetti/array-first-ts

Weekly Downloads

0

Version

0.0.2

License

ISC

Unpacked Size

1.49 kB

Total Files

3

Last publish

Collaborators

  • alex-leonetti