# amanda

> JSON Schema validator

Latest version **1.0.1** (published 2018-06-12) · MIT license · 0 weekly downloads

## Install

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

## 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 | 1.0.1 |
| Published | 2018-06-12 |
| First published | 2011-11-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 6.0.0 |
| Dependencies | 0 |
| Unpacked size | 577.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 47 |
| Author | František Hába |
| Maintainers | abtris, apiary-sre, char0n, kubakubula, netmilk, tu1ly |
| Keywords | JSON, JSON Schema, schema, validator, validate, JSON validator, schema validator, async, browser |

## Links

- npm: https://www.npmjs.com/package/amanda
- Repository: https://github.com/apiaryio/Amanda
- Issues: https://github.com/apiaryio/Amanda/issues
- npm.io page: https://npm.io/package/amanda

## 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

- 1.0.1 (latest) — 2018-06-12
- 1.0.0 — 2018-03-06
- 0.5.1 — 2014-07-01
- 0.5.0 — 2014-06-16
- 0.4.8 — 2014-04-18
- 0.4.7 — 2013-07-07
- 0.4.6 — 2013-06-19
- 0.4.5 — 2013-04-06
- 0.4.4 — 2013-03-01
- 0.4.3 — 2012-12-26
- 0.4.2 — 2012-03-16
- 0.4.1 — 2012-03-16
- 0.4.0 — 2012-03-15
- 0.3.0 — 2012-02-22
- 0.2.2 — 2011-11-29
- … 3 more at https://npm.io/package/amanda/versions

## README

[![Build Status](https://travis-ci.org/apiaryio/Amanda.svg?branch=master)](https://travis-ci.org/apiaryio/Amanda)

<a name="amanda"></a>
# Amanda

[Amanda](https://github.com/apiaryio/Amanda) is aiming to be **a universal schema validation library**. Currently it supports only the [JSON Schema Internet Draft](http://tools.ietf.org/html/draft-zyp-json-schema-03), but I'm planning to add [Orderly](http://orderly-json.org/), [Relax NG](http://relaxng.org/) and others very soon.

<a name="example"></a>
### Example

```javascript
/**
 * Schema
 */
var schema = {
  type: 'object',
  properties: {
    name: {
      required: true,
      type: 'string'
    }
  }
};

/**
 * Data
 */
var data = {
  name: 'Kenneth'
};

// Initialize a JSON Schema validator.
var jsonSchemaValidator = amanda('json');

// Validate the data against the schema.
jsonSchemaValidator.validate(data, schema, function(error) {

  // Do something...

});
```

# Contents

<ul>
  <li><a href="#features">Features</a></li>
  <li><a href="#download">Download</a></li>
  <li><a href="#status">Status</a></li>
  <li><a href="#documentation">Documentation</a></li>
  <li><a href="#compatibility">compatibility</a></li>
  <li><a href="#building">Building</a></li>
  <li><a href="#tests">Tests</a></li>
  <li><a href="#versioning">Versioning</a></li>
  <li><a href="#release-notes">Release Notes</a></li>
  <li><a href="#authors">authors</a></li>
  <li><a href="#license">License</a></li>
</ul>

<a name="features"></a>
## Features

* **Extendable**, you can create **your own attributes**
* Can be used with **Node.js** and **in a browser**
* Amanda has **no dependencies**
* **AMD compatible**, you can load it via [RequireJS](http://requirejs.org/)
* Lightweight
* Fully **documented**
* Tested

## Download

<ul>
  <li><a href="#node.js">Node.js</a></li>
  <li><a href="#browser">Browser</a></li>
</ul>

### Node.js

To install **Amanda**, use [NPM](http://npmjs.org/).

```
$ npm install amanda
```

Then you can load the library via `require`.

```javascript
var amanda = require('amanda');
```

If you prefer [RequireJS](http://requirejs.org/), go ahead.

```javascript
// Configuration options, the path should not include the .js extension.
require.config({
  paths: {
    'amanda': 'path/to/amanda'
  }
});

// Load Amanda
require(['amanda'], function(amanda) {

  // Do something...

});
```

### Browser

Releases for the browser are available for download from GitHub.

| **Version** | **Description** | **Size** | **Action** |
|:------------|:----------------|:---------|:-----------|
| `amanda.js` | *uncompressed, with comments* | 42.12 KB (7.98 KB gzipped) | [Download](https://raw.github.com/apiaryio/Amanda/master/releases/latest/amanda.js) |
| `amanda.min.js` | *compressed, without comments* | 13.8 KB (4.09 KB gzipped) | [Download](https://raw.github.com/apiaryio/Amanda/master/releases/latest/amanda.min.js) |

Or you can use [JAM](http://jamjs.org/).

```
$ jam install amanda
```

Then you can load the library via the `<script>` tag.

```html
<script src="/path/to/amanda.js"></script>
```

...or via [RequireJS](http://requirejs.org/).

```javascript
// Configuration options, the path should not include the .js extension.
require.config({
  paths: {
    'amanda': 'path/to/amanda'
  }
});

// Load Amanda
require(['amanda'], function(amanda) {

  // Do something...

});
```

## Status

| **Branch** | **Status** |
|:-----------|:----------|
| master | [![Build Status](https://secure.travis-ci.org/apiaryio/Amanda.png?branch=master)](http://travis-ci.org/apiaryio/Amanda) |

## Documentation

All documentation is available in the [/docs/](https://github.com/apiaryio/Amanda/tree/master/docs) folder.

## Compatibility

### Node.js

From version **0.6.0**.

### Browsers

*Testing in progress...*

## Building

I have included a `Makefile` with convenience methods for working with the library.

<ul>
  <li><code>make</code> Builds the library</li>
</ul>

## Tests

```
$ npm test
```

## Versioning

Releases will be numbered with the following format.

```
<major>.<minor>.<patch>
```

And constructed with the following guidelines.

* Breaking backwards compatibility bumps the major
* New additions without breaking backwards compatibility bumps the minor
* Bug fixes and misc changes bump the patch

For more information on *semantic versioning*, please visit http://semver.org/.

## Release Notes

* [v0.4.0](https://github.com/Baggz/Amanda/pull/35)
* [v0.3.0](https://github.com/Baggz/Amanda/pull/26)
* [v0.2.2](https://github.com/Baggz/Amanda/pull/15)
* [v0.2.1](https://github.com/Baggz/Amanda/pull/3)
* [v0.2.0](https://github.com/Baggz/Amanda/pull/2)
* [v0.0.2](https://github.com/Baggz/Amanda/pull/1)

## Authors

František Hába ([@Baggz](https://github.com/Baggz)) created [Amanda](https://github.com/apiaryio/Amanda) and [these people](https://github.com/apiaryio/Amanda/graphs/contributors) have contributed.

## License

Please see the [LICENSE](https://github.com/apiaryio/Amanda/blob/master/LICENSE) file.

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