@unction/getmany

Takes a list of keys and a keyed enumerable, and returns the values for those keys


Keywords
unction, functional
License
ICU
Install
npm install @unction/getmany@2.13.0

Documentation

@unction/getMany

Tests Stability Dependencies

Array => Array | Set | Record<string | number | symbol, B> | Map<B, A> | string => Array

Takes a list of keys and a keyed enumerable, and returns the values for those keys. If no key exists, the value is undefined.

getMany(["aaa", "bbb"])({aaa: "111", bbb: "222"}) // ["111", "222"]
getMany(["aaa", "ccc"])({aaa: "111", bbb: "222"}) // ["111", undefined]