Skip to content
This repository has been archived by the owner on May 27, 2018. It is now read-only.

unctionjs/key

Repository files navigation

@unction/key

Tests Stability Dependencies

KeyType => mixed => ValueType

Returns the value of a specific key on an iterable. If no key is found it returns undefined. If the second argument isn't an iterable we return undefined, to allow for graceful failure.

key("aaa")({aaa: "1"}) // "1"
key("bbb")({aaa: "1"}) // undefined
key("bbb")(undefined) // undefined
key(0)(["aaa"]) // "aaa"

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published