# jjve

> Render JJV errors

Latest version **0.5.2** (published 2017-09-21) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

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

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.5.2 |
| Published | 2017-09-21 |
| First published | 2014-05-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/jjve) |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Silas Sewell |
| Maintainers | silas |
| Keywords | jjv, json, schema, jsonschema, errors |

## Links

- npm: https://www.npmjs.com/package/jjve
- Repository: https://github.com/silas/jjve
- Issues: https://github.com/silas/jjve/issues
- npm.io page: https://npm.io/package/jjve

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 0.5.2 (latest) — 2017-09-21
- 0.5.1 — 2015-10-14
- 0.5.0 — 2015-04-07
- 0.4.0 — 2014-07-23
- 0.3.0 — 2014-07-23
- 0.2.1 — 2014-06-14
- 0.2.0 — 2014-06-02
- 0.1.0 — 2014-05-21

## README

# JJV Errors (jjve) [![Build Status](https://travis-ci.org/silas/jjve.png?branch=master)](https://travis-ci.org/silas/jjve)

This is a library to render [JJV][jjv] validation output.

## Usage

``` javascript
var jjv = require('jjv');
var jjve = require('jjve');

var env = jjv();
var je = jjve(env);

var schema = {
  type: 'object',
  properties: { ok: { type: 'boolean' } },
};

var data = { ok: 1 };

var result = env.validate(schema, data);

if (result) {
  var errors = je(schema, data, result);
  console.log(JSON.stringify(errors, null, 4));
}
```

Output

``` json
[
    {
        "code": "INVALID_TYPE",
        "message": "Invalid type: integer should be boolean",
        "data": 1,
        "path": "$.ok"
    }
]
```

## License

This work is licensed under the MIT License (see the LICENSE file).

Error messages derived from [z-schema][z-schema] (see the NOTICE file).

[jjv]: https://github.com/acornejo/jjv
[z-schema]: https://github.com/zaggino/z-schema

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