【文件属性】:
文件名称:schema:强大的模式验证
文件大小:8KB
文件格式:ZIP
更新时间:2021-06-16 09:45:47
JavaScript
架构js
npm install schema-js
定义架构
压缩语法
var schema = new Schema ( {
name : String ,
age : Number ,
phones : [ { number : String , mobile : Boolean } ]
} )
显式语法
var person = new Schema ( {
type : Object ,
properties : {
name : { type : String } ,
age : { type : Number } ,
phones : {
type : Array ,
items : {
typ
【文件预览】:
schema-master
----index.js(40B)
----package.json(750B)
----test()
--------util.js(823B)
--------schema.js(8KB)
----.gitignore(13B)
----lib()
--------util.js(2KB)
--------schema.js(8KB)
----README.md(5KB)