0.3.2 • Published 6 years ago
@givengine/give-tree v0.3.2
give-tree
Node implementation of interval-tree based cache data structures.
Install
npm install @givengine/give-tree
Usage
You may import the entire namespace of GiveTree
, which includes GiveTree
, GiveTreeNode
, GiveNonLeafNode
, DataNode
and WitheringMixin
:
// Import namespace
const GiveTreeNS = require('@givengine/give-tree')
// Extend your own tree and/or nodes
class MyOwnTree extends GiveTreeNS.GiveTree {
// Extension code here
}
class MyOwnNode extends GiveTreeNS.WitheringMixin(GiveTreeNS.GiveTreeNode) {
// Extension code here
}
Or you may selectively import part of the module:
// Import tree definition only
const GiveTree = require('@givengine/give-tree').GiveTree
// Extend your own tree and/or nodes
class MyOwnTree extends GiveTree {
// Extension code here
}