Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/har-validator/lib/index.js')
-rw-r--r--node_modules/har-validator/lib/index.js39
1 files changed, 0 insertions, 39 deletions
diff --git a/node_modules/har-validator/lib/index.js b/node_modules/har-validator/lib/index.js
deleted file mode 100644
index 81d55607c..000000000
--- a/node_modules/har-validator/lib/index.js
+++ /dev/null
@@ -1,39 +0,0 @@
-'use strict'
-
-var schemas = require('./schemas')
-var ValidationError = require('./error')
-var validator = require('is-my-json-valid')
-
-var runner = function (schema, data, cb) {
- var validate = validator(schema, {
- greedy: true,
- verbose: true,
- schemas: schemas
- })
-
- var valid = false
-
- if (data !== undefined) {
- // execute is-my-json-valid
- valid = validate(data)
- }
-
- // callback?
- if (!cb) {
- return valid
- } else {
- return cb(validate.errors ? new ValidationError(validate.errors) : null, valid)
- }
-
- return valid
-}
-
-module.exports = function (data, cb) {
- return runner(schemas.har, data, cb)
-}
-
-Object.keys(schemas).map(function (name) {
- module.exports[name] = function (data, cb) {
- return runner(schemas[name], data, cb)
- }
-})