setup-dotnet/node_modules/nimn_schema_builder
2019-10-03 16:35:25 -07:00
..
dist GPR authentication support 2019-10-03 16:35:25 -07:00
builder.js GPR authentication support 2019-10-03 16:35:25 -07:00
LICENSE GPR authentication support 2019-10-03 16:35:25 -07:00
package.json GPR authentication support 2019-10-03 16:35:25 -07:00
README.md GPR authentication support 2019-10-03 16:35:25 -07:00

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.