json-schema-traverse:遍历 JSON Schema 将每个架构对象传递给回调

时间:2021-08-04 07:39:35
【文件属性】:
文件名称:json-schema-traverse:遍历 JSON Schema 将每个架构对象传递给回调
文件大小:10KB
文件格式:ZIP
更新时间:2021-08-04 07:39:35
json-schema JavaScript json-schema-traverse 遍历 JSON Schema 将每个架构对象传递给回调 安装 npm install json-schema-traverse 用法 const traverse = require ( 'json-schema-traverse' ) ; const schema = { properties : { foo : { type : 'string' } , bar : { type : 'integer' } } } ; traverse ( schema , { cb } ) ; // cb is called 3 times with: // 1. root schema // 2. {type: 'string'} // 3. {type: 'integer'} // Or: traverse ( schema
【文件预览】:
json-schema-traverse-master
----.eslintrc.yml(630B)
----index.js(2KB)
----package.json(1KB)
----.github()
--------FUNDING.yml(57B)
--------workflows()
----LICENSE(1KB)
----index.d.ts(740B)
----spec()
--------.eslintrc.yml(91B)
--------index.spec.js(6KB)
--------fixtures()
----.gitignore(913B)
----README.md(3KB)

网友评论