# nimn_schema_builder

> Build schema from JS object or JSON to feed into nimnjs

Latest version **2.0.0** (published 2018-06-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install nimn_schema_builder
pnpm add nimn_schema_builder
yarn add nimn_schema_builder
bun add nimn_schema_builder
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2018-06-10 |
| First published | 2018-02-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Amit Gupta |
| Maintainers | amitgupta |
| Keywords | nimn, nimnjs, builder, schema |

## Links

- npm: https://www.npmjs.com/package/nimn_schema_builder
- Repository: https://github.com/nimndata/nimnjs-schema-builder
- Homepage: https://github.com/nimndata/nimnjs-schema-builder#readme
- Issues: https://github.com/nimndata/nimnjs-schema-builder/issues
- npm.io page: https://npm.io/package/nimn_schema_builder

## Alternatives

- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@regle/core](https://npm.io/package/@regle/core.md) — 47.0K weekly downloads
- [typeof-arguments](https://npm.io/package/typeof-arguments.md) — 12.5K weekly downloads
- [@lokalise/projects-engine-contracts](https://npm.io/package/@lokalise/projects-engine-contracts.md) — 978 weekly downloads
- [@osjwnpm/nam-laboriosam-quibusdam](https://npm.io/package/@osjwnpm/nam-laboriosam-quibusdam.md) — 70 weekly downloads

## Recent versions

- 2.0.0 (latest) — 2018-06-10
- 1.1.0 — 2018-02-28
- 1.0.0 — 2018-02-25

## README

# nimnjs-schema-builder
Build schema from JS object or JSON to feed into [nimnjs](https://github.com/nimndata/nimnjs-node).


## Usages

First install or add to your npm package
```
$npm install nimn_schema_builder
```

```js
var builder = require("nimn_schema_builder");

var data = {
    "name" : "amit",
    "age" : 32,
    "human" : true,
    "projects" : [
        {
            "name" : "some",
            "description" : "some long description"
        }
    ]
};

var schema = builder.build(data);

/*
var schema = {
    "type": "map",
    "detail": [
        {
            "type": "string",
            "name": "name"
        },
        {
            "type": "number",
            "name": "age"
        },
        {
            "type": "boolean",
            "name": "human"
        },
        {
            "type": "list",
            "detail": {
                "type": "map",
                "detail": [
                    {
                        "type": "string",
                        "name": "name"
                    },
                    {
                        "type": "string",
                        "name": "description"
                    }
                ]
            },
            "name": "projects"
        }
    ]
}
*/
```

You can also use it in browser from [dist](dist/nimn-schema-builder.js) folder.

Check the [demo](https://nimndata.github.io/nimnjs-schema-builder/) for instant use.

---
_Source: https://npm.io/package/nimn_schema_builder · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
