@mathieuprog/find-value
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

find-value

Similar to Array.find(), but returns the value of the function invocation instead of the element itself

import findValue from '@mathieuprog/find-value';

findValue([1, 2, 3], (n) => n > 2 && n * 2) // 6
findValue([1, 2, 3], (n) => n > 3 && n * 2) // undefined

Install

You can get @mathieuprog/find-value via npm.

npm i @mathieuprog/find-value

Readme

Keywords

none

Package Sidebar

Install

npm i @mathieuprog/find-value

Weekly Downloads

1

Version

1.0.1

License

Apache-2.0

Unpacked Size

12.7 kB

Total Files

7

Last publish

Collaborators

  • mathieuprog