@kilianvalkhof/treecko

1.0.0 • Public • Published

What is a treecko?

treecko

npm version

A collection of functional and immutable helpers for working with tree data structures.

  • All of the following helpers support tree objects as well as arrays of tree objects.
  • All methods are curried, so you can use partial application.
  • Tree nodes must have a children array.

Mapping

Reducing

Finding

Filtering

Side Effects

Flattening

Restructuring

Misc

TODO

  • [ ] Support different values for children key
  • [ ] Support different values for id key in flattenToMap and changeParent
  • [ ] Support different values for parentId key in changeParent
  • [ ] Add breadth-first versions of methods

Versions

Current Tags

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

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    1

Package Sidebar

Install

npm i @kilianvalkhof/treecko

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • kilianvalkhof