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

another-json-schema

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

another-json-schema - npm Package Compare versions

Comparing version 1.1.5 to 1.2.0

14

index.js

@@ -16,7 +16,5 @@ 'use strict';

var helpers = {};
AJS.register = function register(name, fn) {
if (!name || !fn) throw new TypeError('Missing name or fn');
helpers[name] = fn;
helpersFuncs[name] = fn;
};

@@ -184,3 +182,3 @@

function validate(value, currentKey, parentNode) {
var valid = helpers.type.call(ctx, value, ctx._children.type, currentKey, parentNode);
var valid = helpersFuncs.type.call(ctx, value, ctx._children.type, currentKey, parentNode);
if (!valid) {

@@ -192,6 +190,6 @@ error = genError(value, ctx, 'type');

for (var helper in ctx._children) {
if (!valid || 'type' === helper || !helpers[helper] || (opts[helper] !== undefined && !opts[helper])) {
if (!valid || 'type' === helper || !helpersFuncs[helper] || (opts[helper] !== undefined && !opts[helper])) {
continue;
}
valid = helpers[helper].call(ctx, value, ctx._children[helper], currentKey, parentNode);
valid = helpersFuncs[helper].call(ctx, value, ctx._children[helper], currentKey, parentNode);
if (!valid) {

@@ -237,5 +235,1 @@ error = genError(value, ctx, helper);

module.exports.helpers = helpersFuncs;
Object.keys(helpersFuncs).forEach(function (helper) {
AJS.register(helper, helpersFuncs[helper]);
});
{
"name": "another-json-schema",
"version": "1.1.5",
"version": "1.2.0",
"description": "Another JSON Schema, simple & flexible & intuitive.",

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

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