npm.io
1.0.1 • Published 4 years ago

deep-mutate-object

Licence
MIT
Version
1.0.1
Deps
0
Size
14 kB
Vulns
0
Weekly
0

deep-mutate-object

Deep traverse walk and mutate object keys and/or values.

npm i deep-mutate-object pnpm add deep-mutate-object yarn add deep-mutate-object

API

# deepMutate(obj, walkFn) src/deep-mutate-object.ts#L1

    # obj

      any

    # walkFn(key, value, holder)

      # key

        string

      # value

        any

      # holder

        any

      walkFn(key, value, holder)  =>

        tuple

    deepMutate(obj, walkFn)  =>

      any

Contributing

Fork or edit and submit a PR.

All contributions are welcome!

License

MIT 2022 stagas