New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

freeman-check

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

freeman-check - npm Package Compare versions

Comparing version 3.0.2 to 3.0.3

2

package.json
{
"name": "freeman-check",
"version": "3.0.2",
"version": "3.0.3",
"description": "Easy type and format checking on JavaScript objects",

@@ -5,0 +5,0 @@ "scripts": {

@@ -7,3 +7,2 @@ "use strict";

exports.Check = void 0;
const assert_1 = __importDefault(require("assert"));
const CheckError_1 = require("./CheckError");

@@ -22,3 +21,4 @@ const jsonschema_1 = require("jsonschema");

constructor(schema) {
(0, assert_1.default)(schema, new CheckError_1.CheckError(`Schema must be defined in constructor.`));
if (!schema)
throw new CheckError_1.CheckError(`Schema must be defined in constructor.`);
this.schema = schema;

@@ -35,3 +35,4 @@ }

}
(0, assert_1.default)(this.schema, new CheckError_1.CheckError(`test can't be called on Check instances initialized without a schema.`));
if (!this.schema)
throw new CheckError_1.CheckError(`test can't be called on Check instances initialized without a schema.`);
// validate.

@@ -72,3 +73,4 @@ const result = (0, jsonschema_1.validate)(object, this.schema);

}
(0, assert_1.default)(type, new CheckError_1.CheckError(`Validation failed, and then there was an internal error while determining the required type of ${subject}.`));
if (!type)
throw new CheckError_1.CheckError(`Validation failed, and then there was an internal error while determining the required type of ${subject}.`);
problem = 'needs to be ' + (0, anora_1.default)(type) + ' `' + type + '`';

@@ -75,0 +77,0 @@ break;

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