@unction/onlykeys
TypeScript icon, indicating that this package has built-in type declarations

2.10.0 • Public • Published

@unction/onlyKeys

Tests Stability Dependencies

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",
// }

Readme

Keywords

Package Sidebar

Install

npm i @unction/onlykeys

Weekly Downloads

0

Version

2.10.0

License

SEE LICENSE IN LICENSE

Unpacked Size

19.5 kB

Total Files

7

Last publish

Collaborators

  • krainboltgreene