@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
}

/@unction/hammer/

    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