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

goodeggs-json-schema-validator

Package Overview
Dependencies
Maintainers
5
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

goodeggs-json-schema-validator - npm Package Compare versions

Comparing version 4.1.0 to 4.2.0

7

index.js

@@ -60,5 +60,6 @@ 'use strict';

module.exports = _tv2.default;
module.exports.assertValid = function (data, schema) {
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

@@ -72,3 +73,5 @@

var message = function () {
var result = 'failed';
var result = '';
if (errorMessage) result += errorMessage + '; ';
result += 'failed';
if (schema.title) result += ' "' + schema.title + '"';

@@ -75,0 +78,0 @@ result += ' schema validation';

{
"name": "goodeggs-json-schema-validator",
"version": "4.1.0",
"version": "4.2.0",
"description": "Good Eggs JSON Schema Validator",

@@ -5,0 +5,0 @@ "author": "Good Eggs <open-source@goodeggs.com>",

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