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

json-dry

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-dry - npm Package Compare versions

Comparing version 1.0.8 to 1.0.9

5

CHANGELOG.md

@@ -0,1 +1,6 @@

## 1.0.9 (2018-12-06)
* Also export the `walk` function
* Use `Namespace.getClassForUndry()` methods if available
## 1.0.8 (2018-11-09)

@@ -2,0 +7,0 @@

27

lib/json-dry.js

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

* @since 1.0.0
* @version 1.0.5
* @version 1.0.9
*

@@ -630,3 +630,4 @@ * @param {String} value The name of the class

var constructor;
var constructor,
ns;

@@ -652,12 +653,22 @@ // Return nothing for falsy values

if (value.namespace) {
constructor = fromPath(exports.Classes, value.namespace);
ns = fromPath(exports.Classes, value.namespace);
} else {
constructor = exports.Classes;
ns = exports.Classes;
}
if (value.dry_class) {
constructor = fromPath(constructor, value.dry_class);
constructor = fromPath(ns, value.dry_class);
} else if (value.name) {
constructor = constructor[value.name];
constructor = ns[value.name];
}
if (!constructor && ns) {
if (ns.main_class) {
ns = ns.main_class;
}
if (ns && typeof ns.getClassForUndry == 'function') {
constructor = ns.getClassForUndry(value.dry_class || value.name);
}
}
}

@@ -975,2 +986,3 @@

* @param {Function} fnc The function to perform on every entry
* @param {Object} result The object to add to
*

@@ -1146,2 +1158,3 @@ * @return {Object}

exports.registerDrier = registerDrier;
exports.findClass = findClass;
exports.findClass = findClass;
exports.walk = walk;
{
"name": "json-dry",
"description": "Don't repeat yourself, JSON: Add support for (circular) references, class instances, ...",
"version": "1.0.8",
"version": "1.0.9",
"author": "Jelle De Loecker <jelle@develry.be>",

@@ -6,0 +6,0 @@ "keywords": [

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