@unction/takeFirst
number => Array | string => Array | string
Returns the first N of a list of ordered values.
takeFirst(2)([1, 2, 3]) // [1, 2]
takeFirst(1)([1, 2, 3]) // [1]
takeFirst(2)("abc") // "ab"
takeFirst(1)("abc") // "a"
Returns the first N of a list of ordered values
Homepage Repository npm JavaScript Download
npm install @unction/takefirst@8.11.1
The Tidelift Subscription provides access to a continuously curated stream of human-researched and maintainer-verified data on open source packages and their licenses, releases, vulnerabilities, and development practices.
Learn more →Something wrong with this page? Make a suggestion
Export .ABOUT file for this package
Last synced: 2022-04-07 16:46:17 UTC
Login to resync this project