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

abolish

Package Overview
Dependencies
Maintainers
1
Versions
148
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

abolish - npm Package Compare versions

Comparing version 3.0.4 to 3.0.5

2

package.json
{
"name": "abolish",
"version": "3.0.4",
"version": "3.0.5",
"description": "A javascript object validator.",

@@ -5,0 +5,0 @@ "main": "index.js",

"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -159,3 +150,3 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

*/
let validated = Object.assign({}, object);
let validated = { ...object };
/**

@@ -222,3 +213,3 @@ * Get Keys to be validated

*/
ruleData = Object.assign(Object.assign({}, internalWildcardRules), ruleData);
ruleData = { ...internalWildcardRules, ...ruleData };
/**

@@ -369,3 +360,3 @@ * Loop through ruleData to check if validators defined exists

*/
return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {
return new Promise(async (resolve) => {
/**

@@ -386,3 +377,3 @@ * Loop through jobs and run their validators

*/
validationResult = yield validator.validator(objectValue, validatorOption, {
validationResult = await validator.validator(objectValue, validatorOption, {
error: (message, data) => new AbolishError_1.default(message, data),

@@ -441,5 +432,5 @@ modifier: new ObjectModifier_1.default(validated, rule)

return resolve([false, Functions_1.Pick(validated, keysToBeValidated)]);
}));
});
}
}
module.exports = Abolish;

@@ -58,3 +58,3 @@ "use strict";

rule = StringToRules_1.default(rule);
generatedRule = Object.assign(Object.assign({}, generatedRule), rule);
generatedRule = { ...generatedRule, ...rule };
}

@@ -61,0 +61,0 @@ return generatedRule;

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