Initial commit
[yaffs-website] / node_modules / har-validator / README.md
1 # HAR Validator [![version][npm-version]][npm-url] [![License][npm-license]][license-url]
2
3 > Extremely fast HTTP Archive ([HAR](https://github.com/ahmadnassri/har-spec/blob/master/versions/1.2.md)) validator using JSON Schema.
4
5 [![Build Status][travis-image]][travis-url]
6 [![Downloads][npm-downloads]][npm-url]
7 [![Code Climate][codeclimate-quality]][codeclimate-url]
8 [![Coverage Status][codeclimate-coverage]][codeclimate-url]
9 [![Dependency Status][dependencyci-image]][dependencyci-url]
10 [![Dependencies][david-image]][david-url]
11
12 ## Install
13
14 ```bash
15 npm install --only=production --save har-validator
16 ```
17
18 ## Usage
19
20 I recommend using an optimized build matching your Node.js environment version, otherwise, the standard `require` would work just fine with any version of Node `>= v4.0` .
21
22 ```js
23 /*
24  * Node 7
25  */
26 const validate = require('har-validator/lib/node7')
27
28 /*
29  * Node 6
30  */
31 const validate = require('har-validator/lib/node6')
32
33 /*
34  * Node 4 (Default)
35  */
36 var validate = require('har-validator')
37 ```
38
39 ## CLI Usage
40
41 Please refer to [`har-cli`](https://github.com/ahmadnassri/har-cli) for more info.
42
43 ## API
44
45 **Note**: as of [`v2.0.0`](https://github.com/ahmadnassri/har-validator/releases/tag/v2.0.0) this module defaults to Promise based API. *For backward comptability with `v1.x` an [async/callback API](docs/async.md) is also provided*
46
47 - [async API](docs/async.md)
48 - [callback API](docs/async.md)
49 - [Promise API](docs/promise.md) *(default)*
50
51 ----
52 > :copyright: [ahmadnassri.com](https://www.ahmadnassri.com/)  · 
53 > License: [ISC][license-url]  · 
54 > Github: [@ahmadnassri](https://github.com/ahmadnassri)  · 
55 > Twitter: [@ahmadnassri](https://twitter.com/ahmadnassri)
56
57 [license-url]: http://choosealicense.com/licenses/isc/
58
59 [travis-url]: https://travis-ci.org/ahmadnassri/har-validator
60 [travis-image]: https://img.shields.io/travis/ahmadnassri/har-validator.svg?style=flat-square
61
62 [npm-url]: https://www.npmjs.com/package/har-validator
63 [npm-license]: https://img.shields.io/npm/l/har-validator.svg?style=flat-square
64 [npm-version]: https://img.shields.io/npm/v/har-validator.svg?style=flat-square
65 [npm-downloads]: https://img.shields.io/npm/dm/har-validator.svg?style=flat-square
66
67 [codeclimate-url]: https://codeclimate.com/github/ahmadnassri/har-validator
68 [codeclimate-quality]: https://img.shields.io/codeclimate/github/ahmadnassri/har-validator.svg?style=flat-square
69 [codeclimate-coverage]: https://img.shields.io/codeclimate/coverage/github/ahmadnassri/har-validator.svg?style=flat-square
70
71 [david-url]: https://david-dm.org/ahmadnassri/har-validator
72 [david-image]: https://img.shields.io/david/ahmadnassri/har-validator.svg?style=flat-square
73
74 [dependencyci-url]: https://dependencyci.com/github/ahmadnassri/har-validator
75 [dependencyci-image]: https://dependencyci.com/github/ahmadnassri/har-validator/badge?style=flat-square