wbs
v1.0.1
Published
A WBS numbering library taking a cytoscape graph as argument, and returning a clone graph with each wbsCode associated to the nodes, according to the WBS numbering system
Downloads
7
Readme
README
A WBS numbering library taking a cytoscape graph as argument, and returning a clone graph with each wbsCode associated to the nodes, according to the WBS numbering system
How do I get set up?
- npm install
- typings install
- npm link typescript
- to compile: webpack
How to use
let nodes ={
"nodes": [
{ "data": {"id": "a"}},
{ "data": {"id": "b", "parent": "a"}},
{ "data": {"id": "c", "parent": "a"}},
{ "data": {"id": "d", "parent": "b"}}
]
};
let newGraph = WbsNumbering.process(nodes);
/* returns
{
"nodes": [
{ "data": {"id": "a", "wbsCode": "1"}},
{ "data": {"id": "b", "parent": "a", "wbsCode": "1.1"}},
{ "data": {"id": "c", "parent": "a", "wbsCode": "1.2"}},
{ "data": {"id": "d", "parent": "b", "wbsCode": "1.1.1"}}
]
};
*/