@unction/onlykeys
v2.10.0
Published
Reduces the keyed enumerable to an object with only the keys provided
Downloads
6
Readme
@unction/onlyKeys
Array | Set => Array | Set | Record<string | number | symbol, B> | Map<B, A> | string => Array | Set | Record<string | number | symbol, B> | Map<B, A> | string
Reduces the keyed enumerable to an object with only the keys provided.
onlyKeys(
["alpha", "beta", "delta"]
)(
{
feta: "0",
alpha: "1",
beta: "2",
delta: "3",
}
)
// {
// alpha: "1",
// beta: "2",
// delta: "3",
// }