ngraph.tojson:将图形存储为简单 json 格式的库

时间:2021-08-04 16:51:24
【文件属性】:
文件名称:ngraph.tojson:将图形存储为简单 json 格式的库
文件大小:60KB
文件格式:ZIP
更新时间:2021-08-04 16:51:24
JavaScript ngraph.tojson 将图形存储为简单 json 格式的库 用法 var graph = require ( 'ngraph.graph' ) ( ) ; graph . addLink ( 'hello' , 'world' ) ; var toJSON = require ( 'ngraph.tojson' ) ; console . log ( toJSON ( graph ) ) ; // Produces output: // {"nodes":[{"id":"hello"},{"id":"world"}],"links":[{"fromId":"hello","toId":"world"}]} 您还可以提供自定义变换函数来在将节点/边推送到输出之前对其进行变换: var g = require ( 'ngraph.graph' ) ( ) ; g . addNo
【文件预览】:
ngraph.tojson-master
----index.js(1KB)
----package.json(571B)
----.github()
--------workflows()
----test()
--------index.js(2KB)
----LICENSE(1KB)
----package-lock.json(261KB)
----.gitignore(109B)
----README.md(1KB)

网友评论