# jov

> JavaScript Object Validator

Latest version **0.0.3** (published 2018-01-09) · MIT license · 0 weekly downloads

## Install

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

## 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.0.3 |
| Published | 2018-01-09 |
| First published | 2017-12-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Olof Enström |
| Maintainers | oenstrom |
| Keywords | javascript, objects, validation |

## Links

- npm: https://www.npmjs.com/package/jov
- Repository: https://github.com/oenstrom/jov
- Homepage: https://github.com/oenstrom/jov#readme
- Issues: https://github.com/oenstrom/jov/issues
- npm.io page: https://npm.io/package/jov

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.0.3 (latest) — 2018-01-09
- 0.0.2 — 2017-12-21
- 0.0.1 — 2017-12-10
- 0.0.0 — 2017-12-09

## README

# JOV

[![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/oenstrom/jov/blob/master/LICENSE)
[![npm](https://img.shields.io/npm/v/jov.svg)](https://www.npmjs.com/package/jov)
[![Scrutinizer](https://img.shields.io/scrutinizer/g/oenstrom/jov.svg)](https://scrutinizer-ci.com/g/oenstrom/jov/?branch=master)
[![Scrutinizer Coverage](https://img.shields.io/scrutinizer/coverage/g/oenstrom/jov.svg)](https://scrutinizer-ci.com/g/oenstrom/jov/?branch=master)
[![Scrutinizer Build](https://img.shields.io/scrutinizer/build/g/oenstrom/jov.svg)](https://scrutinizer-ci.com/g/oenstrom/jov/?branch=master)

JOV is a JavaScript module for validating JavaScript objects.


## Installation

JOV is available as the `jov` package on [npm](https://www.npmjs.com/package/jov).

```bash
$ npm install --save jov
```


## Usage

```javascript
const jov = require("jov");

const schema = { username: new jov.string(true).required().min(3) };
const data = { username: "oenstrom" };

jov.validate(data, schema, "json");
```
More info coming soon.


## API

### `JString(strict = false)`
*strict = true - makes the validation check the type of the key.*

- `.required()` *- Set the key to be required.*
- `.min(minValue)` *- Set a minimum required length.*
- `.max(maxValue)` *- Set a maxmium length.*
- `.email()` *- Set the key to only accept email format.*
- `.alphanum()` *- Set the key to only accept alphanumeric characters.*

### `validate(data, schema, format = "obj")`
***data** = the data to validate.*  
***schema** = the schema that **data** validates against.*  
***format** = the format to output error as. Available formats: "obj" and "json".*


## License
JOV is [MIT licensed](https://github.com/oenstrom/jov/blob/master/LICENSE).

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