0.1.8 • Published 5 years ago

@cranq/fn-tree v0.1.8

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

fn-tree

Functional tree manipulation tools

Utilities

  • pathEquals(a, b): Tells whether two paths are equal.
  • pathToString(path): Converts array representation of path to string.
  • stringToPath(string): Converts string representation of path to array.

Tree querying / manipulation

  • appendNode(tree, path, values, concat): Appends the specified node to the node in the tree on the specified path.
  • appendNodeI(tree, path, values, concat): Appends the specified node to the node in the tree on the specified path immutably.
  • deleteNode(tree, path): Deletes node from the specified path in the tree.
  • deleteNodeI(tree, path): Deletes node from the specified path in the tree immutably.
  • deletePath(tree, path): Deletes nodes on the specified path in the tree, up to (including) the first node with siblings.
  • getNode(tree, path): Retrieves the node from the specified path in the tree.
  • setNode(tree, path, value): Sets the specified node in the tree on the specified path.
  • setNodeI(tree, path, value): Sets specified node in the tree on the specified path immutably.
0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago