Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/stagas/deep-mutate-object

Deep traverse walk and mutate object keys and/or values.
https://github.com/stagas/deep-mutate-object

Last synced: 14 days ago
JSON representation

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

Awesome Lists containing this project

README

        


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](https://github.com/stagas/deep-mutate-object/fork) or [edit](https://github.dev/stagas/deep-mutate-object) and submit a PR.

All contributions are welcome!

## License

MIT © 2022 [stagas](https://github.com/stagas)