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

12.15.0 • Public • Published

@unction/withoutKeyRecursive

Tests Stability Dependencies

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

Returns a copy of an iterable without a key, no matter how deep the tree.

withoutKeyRecursive("__abstraction__")(
  {
    id: "1",
    name: "Kurtis Rainbolt-Greene",
    attributes: {
      version: "v1",
      namespace: "accounts",
      __abstraction__: {errors: []},
    },
    __abstraction__: {errors: []},
  }
)

Which will return:

{
  id: "1",
  name: "Kurtis Rainbolt-Greene",
  attributes: {
    version: "v1",
    namespace: "accounts",
  },
}

Readme

Keywords

Package Sidebar

Install

npm i @unction/withoutkeyrecursive

Weekly Downloads

2

Version

12.15.0

License

SEE LICENSE IN LICENSE

Unpacked Size

23.6 kB

Total Files

7

Last publish

Collaborators

  • krainboltgreene