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

15.15.0 • Public • Published

@unction/hammer

Tests Stability Dependencies

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

Use this to de-nest a nested keyed enumerable.

const payload = {
  id: 1
  attributes: {
    name: "Kurtis Rainbolt-Greene",
    age: 26
  }
}

hammer("attributes")(payload)

Which returns:

{
  id: 1,
  name: "Kurtis Rainbolt-Greene",
  age: 26
}

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 15.15.0
    1
    • latest

Version History

Package Sidebar

Install

npm i @unction/hammer

Weekly Downloads

103

Version

15.15.0

License

SEE LICENSE IN LICENSE

Unpacked Size

16.9 kB

Total Files

7

Last publish

Collaborators

  • krainboltgreene