goodeggs-json-schema-validator
Advanced tools
Comparing version 4.2.2 to 4.2.3
@@ -61,8 +61,6 @@ 'use strict'; | ||
module.exports.assertValid = function (data, schema, errorMessage) { | ||
(0, _assert2.default)(data !== undefined, 'data must be defined'); | ||
(0, _assert2.default)((typeof schema === 'undefined' ? 'undefined' : _typeof(schema)) === 'object', 'schema must be an object'); | ||
if (errorMessage != null) (0, _assert2.default)(typeof errorMessage === 'string', 'errorMessage must be a string'); | ||
var cleanedData = JSON.parse(JSON.stringify(data)); // remove undefined, convert dates to ISO strings, etc | ||
var _tv4$validateResult = _tv2.default.validateResult(cleanedData, schema, null, true), | ||
var _tv4$validateResult = _tv2.default.validateResult(data, schema, null, true), | ||
valid = _tv4$validateResult.valid, | ||
@@ -69,0 +67,0 @@ error = _tv4$validateResult.error; |
{ | ||
"name": "goodeggs-json-schema-validator", | ||
"version": "4.2.2", | ||
"version": "4.2.3", | ||
"description": "Good Eggs JSON Schema Validator", | ||
@@ -5,0 +5,0 @@ "author": "Good Eggs <open-source@goodeggs.com>", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6129
69