1.0.1 • Published 1 year ago

@mathieuprog/find-value v1.0.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 year ago

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
1.0.1

1 year ago

1.0.0

1 year ago