Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

har-validator

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

har-validator - npm Package Compare versions

Comparing version 5.1.0 to 5.1.3

15

lib/async.js

@@ -7,2 +7,12 @@ var Ajv = require('ajv')

function createAjvInstance () {
var ajv = new Ajv({
allErrors: true
})
ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-06.json'))
ajv.addSchema(schemas)
return ajv
}
function validate (name, data, next) {

@@ -12,6 +22,3 @@ data = data || {}

// validator config
ajv = ajv || new Ajv({
allErrors: true,
schemas: schemas
})
ajv = ajv || createAjvInstance()

@@ -18,0 +25,0 @@ var validate = ajv.getSchema(name + '.json')

@@ -7,2 +7,12 @@ var Ajv = require('ajv')

function createAjvInstance () {
var ajv = new Ajv({
allErrors: true
})
ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-06.json'))
ajv.addSchema(schemas)
return ajv
}
function validate (name, data) {

@@ -12,6 +22,3 @@ data = data || {}

// validator config
ajv = ajv || new Ajv({
allErrors: true,
schemas: schemas
})
ajv = ajv || createAjvInstance()

@@ -18,0 +25,0 @@ var validate = ajv.getSchema(name + '.json')

@@ -1,1 +0,47 @@

{"version":"5.1.0","name":"har-validator","description":"Extremely fast HTTP Archive (HAR) validator using JSON Schema","author":"Ahmad Nassri <ahmad@ahmadnassri.com> (https://www.ahmadnassri.com/)","homepage":"https://github.com/ahmadnassri/har-validator","repository":{"type":"git","url":"https://github.com/ahmadnassri/har-validator.git"},"license":"ISC","main":"lib/promise.js","keywords":["har","cli","ajv","http","archive","validate","validator"],"engines":{"node":">=4"},"files":["lib"],"bugs":{"url":"https://github.com/ahmadnassri/har-validator/issues"},"scripts":{"lint":"standard && echint","pretest":"npm run lint","test":"tap test","coverage":"tap test --reporter silent --coverage"},"devDependencies":{"echint":"^4.0.1","standard":"^10.0.3","tap":"^10.7.2"},"dependencies":{"ajv":"^5.3.0","har-schema":"^2.0.0"}}
{
"version": "5.1.3",
"name": "har-validator",
"description": "Extremely fast HTTP Archive (HAR) validator using JSON Schema",
"author": "Ahmad Nassri <ahmad@ahmadnassri.com> (https://www.ahmadnassri.com/)",
"homepage": "https://github.com/ahmadnassri/node-har-validator",
"repository": {
"type": "git",
"url": "https://github.com/ahmadnassri/node-har-validator.git"
},
"license": "MIT",
"main": "lib/promise.js",
"keywords": [
"har",
"cli",
"ajv",
"http",
"archive",
"validate",
"validator"
],
"engines": {
"node": ">=6"
},
"files": [
"lib"
],
"bugs": {
"url": "https://github.com/ahmadnassri/node-har-validator/issues"
},
"scripts": {
"lint:deps": "npx updated",
"lint:ec": "npx editorconfig-checker .",
"lint:js": "npx eslint .",
"lint:md": "npx remark --quiet --frail .",
"lint": "npx run-p lint:*",
"open:coverage": "opener coverage/lcov-report/index.html",
"test": "tap test --coverage-report=lcov --no-browser"
},
"devDependencies": {
"tap": "^12.0.1"
},
"dependencies": {
"ajv": "^6.5.5",
"har-schema": "^2.0.0"
}
}

@@ -1,16 +0,11 @@

# HAR Validator [![version][npm-version]][npm-url] [![License][license-image]][license-url]
# HAR Validator
[![License][license-image]][license-url] [![version][npm-image]][npm-url] [![Build Status][circle-image]][circle-url]
> Extremely fast HTTP Archive ([HAR](https://github.com/ahmadnassri/har-spec/blob/master/versions/1.2.md)) validator using JSON Schema.
[![Build Status][travis-image]][travis-url]
[![Downloads][npm-downloads]][npm-url]
[![Code Climate][codeclimate-quality]][codeclimate-url]
[![Coverage Status][codeclimate-coverage]][codeclimate-url]
[![Dependency Status][dependencyci-image]][dependencyci-url]
[![Dependencies][david-image]][david-url]
## Install
```bash
npm install --only=production --save har-validator
npm install har-validator
```

@@ -24,32 +19,20 @@

**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 compatibility with `v1.x` an [async/callback API](docs/async.md) is also provided*
**Note**: as of [`v2.0.0`](https://github.com/ahmadnassri/node-har-validator/releases/tag/v2.0.0) this module defaults to Promise based API. _For backward compatibility with `v1.x` an [async/callback API](docs/async.md) is also provided_
- [async API](docs/async.md)
- [callback API](docs/async.md)
- [Promise API](docs/promise.md) *(default)*
- [Promise API](docs/promise.md) _(default)_
----
> :copyright: [ahmadnassri.com](https://www.ahmadnassri.com/) &nbsp;&middot;&nbsp;
> License: [ISC][license-url] &nbsp;&middot;&nbsp;
> Github: [@ahmadnassri](https://github.com/ahmadnassri) &nbsp;&middot;&nbsp;
---
> Author: [Ahmad Nassri](https://www.ahmadnassri.com/) &bull;
> Github: [@ahmadnassri](https://github.com/ahmadnassri) &bull;
> Twitter: [@ahmadnassri](https://twitter.com/ahmadnassri)
[license-url]: http://choosealicense.com/licenses/isc/
[license-image]: https://img.shields.io/github/license/ahmadnassri/har-validator.svg?style=flat-square
[license-url]: LICENSE
[license-image]: https://img.shields.io/github/license/ahmadnassri/node-har-validator.svg?style=for-the-badge&logo=circleci
[travis-url]: https://travis-ci.org/ahmadnassri/har-validator
[travis-image]: https://img.shields.io/travis/ahmadnassri/har-validator.svg?style=flat-square
[circle-url]: https://circleci.com/gh/ahmadnassri/workflows/node-har-validator
[circle-image]: https://img.shields.io/circleci/project/github/ahmadnassri/node-har-validator/master.svg?style=for-the-badge&logo=circleci
[npm-url]: https://www.npmjs.com/package/har-validator
[npm-version]: https://img.shields.io/npm/v/har-validator.svg?style=flat-square
[npm-downloads]: https://img.shields.io/npm/dm/har-validator.svg?style=flat-square
[codeclimate-url]: https://codeclimate.com/github/ahmadnassri/har-validator
[codeclimate-quality]: https://img.shields.io/codeclimate/github/ahmadnassri/har-validator.svg?style=flat-square
[codeclimate-coverage]: https://img.shields.io/codeclimate/coverage/github/ahmadnassri/har-validator.svg?style=flat-square
[david-url]: https://david-dm.org/ahmadnassri/har-validator
[david-image]: https://img.shields.io/david/ahmadnassri/har-validator.svg?style=flat-square
[dependencyci-url]: https://dependencyci.com/github/ahmadnassri/har-validator
[dependencyci-image]: https://dependencyci.com/github/ahmadnassri/har-validator/badge?style=flat-square
[npm-image]: https://img.shields.io/npm/v/har-validator.svg?style=for-the-badge&logo=npm

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc