You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
6 years ago | |
---|---|---|
.. | ||
dist | 6 years ago | |
LICENSE | 6 years ago | |
README.md | 6 years ago | |
builder.js | 6 years ago | |
package.json | 6 years ago |
README.md
nimnjs-schema-builder
Build schema from JS object or JSON to feed into nimnjs.
Usages
First install or add to your npm package
$npm install nimn_schema_builder
var builder = require("nimn_schema_builder");
var data = {
name : "amit",
age : 32,
human : true,
projects : [
{
name: "some",
from: new Date(),
//to: null,
decription : "some long description"
}
]
}
var schema = builder.build(data);
/*
var schema = {
name : "string",
age : "number",
human : "boolean",
projects : [
{
name: "string",
from: "date",
decription : "string"
}
]
};
*/
You can also use it in browser from dist folder.
Check the demo for instant use.