0.6.8 • Published 6 years ago

@cedric-demongivert/immutable-tree v0.6.8

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

Immutable Tree

build status coverage report

An immutable tree data-structure for web-components based frameworks.

Getting started

Install @rnp/immutable-tree using npm.

npm install @rnp/immutable-tree --save

Then import it and create a tree type :

import { ImmutableTree } from '@rnp/immutable-tree'

const MyTree = new ImmutableTree({
  'a': null,
  'b': 0,
  'c': 6
})

And enjoy the API.

let myTree = new MyTree()

myTree.set(['parent', 'child', 'sub-child', 'b'], 10)
console.log(myTree.get(['parent', 'child', 'sub-child', 'b'])) // 10