# schema2

> The idea is simple structure and evaluates the objects in Javascript.

Latest version **0.1.1** (published 2016-07-21) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2016-07-21 |
| First published | 2016-07-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Jonathan Delgado |
| Maintainers | alfa30 |
| Keywords | schema, valite, library |

## Links

- npm: https://www.npmjs.com/package/schema2
- npm.io page: https://npm.io/package/schema2

## Alternatives

- [@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
- [@oridune/validator](https://npm.io/package/@oridune/validator.md) — 16 weekly downloads

## Recent versions

- 0.1.1 (latest) — 2016-07-21
- 0.1.0 — 2016-07-21

## README

Schema2
=======

`＜(。_。)＞` Sorry, this is just beginning.

### tl;dr
The idea is simple structure and evaluates the objects in Javascript.


## Example
```javascript
import Schema2 from 'schema2'

schema = Schema2.parse({
    title: String,
    body: {
        code: Number,
        message: String,
    }
})

io.on('message', (data, next) => {
    // data: Object {title: "Hola", villain: { face: ":(" }}

    let validated = schema.validate(data)
    /*
    Object {title: "Hola"}
     */

    next(validated)
})
```

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