Comparing version 1.5.2 to 1.5.3
@@ -0,1 +1,5 @@ | ||
# 1.5.3 | ||
- Allow meta.id to be an object for the datastructure. | ||
# 1.5.2 | ||
@@ -2,0 +6,0 @@ |
@@ -10,3 +10,3 @@ // Generated by CoffeeScript 1.12.4 | ||
module.exports = dereference = function(root, dataStructures, known) { | ||
var i, item, j, len, member, newKnown, properties, property, ref, ref2, ref3, ref4; | ||
var i, id, item, j, len, member, newKnown, properties, property, ref, ref2, ref3; | ||
if (known == null) { | ||
@@ -16,3 +16,7 @@ known = []; | ||
newKnown = known; | ||
if (known.indexOf(root.element) !== -1 || known.indexOf((ref2 = root.meta) != null ? ref2.id : void 0) !== -1) { | ||
id = (ref2 = root.meta) != null ? ref2.id : void 0; | ||
if (typeof id === 'object') { | ||
id = id.content; | ||
} | ||
if (known.indexOf(root.element) !== -1 || known.indexOf(id) !== -1) { | ||
createLink(root, { | ||
@@ -23,4 +27,4 @@ relation: 'origin', | ||
return root; | ||
} else if (((ref3 = root.meta) != null ? ref3.id : void 0) != null) { | ||
newKnown = known.concat(root.meta.id); | ||
} else if (id != null) { | ||
newKnown = known.concat(id); | ||
} | ||
@@ -31,7 +35,7 @@ switch (root.element) { | ||
root.content = (function() { | ||
var j, len, ref4, results; | ||
ref4 = root.content || []; | ||
var j, len, ref3, results; | ||
ref3 = root.content || []; | ||
results = []; | ||
for (j = 0, len = ref4.length; j < len; j++) { | ||
item = ref4[j]; | ||
for (j = 0, len = ref3.length; j < len; j++) { | ||
item = ref3[j]; | ||
results.push(dereference(item, dataStructures, newKnown)); | ||
@@ -55,5 +59,5 @@ } | ||
ref.content = JSON.parse(JSON.stringify(ref.content)); | ||
ref4 = ref.content; | ||
for (j = 0, len = ref4.length; j < len; j++) { | ||
property = ref4[j]; | ||
ref3 = ref.content; | ||
for (j = 0, len = ref3.length; j < len; j++) { | ||
property = ref3[j]; | ||
createLink(property, { | ||
@@ -60,0 +64,0 @@ relation: 'origin', |
{ | ||
"name": "eidolon", | ||
"version": "1.5.2", | ||
"version": "1.5.3", | ||
"description": "Generate JSON or JSON Schema from Refract & MSON data structures", | ||
@@ -5,0 +5,0 @@ "main": "lib/eidolon.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
29258
544
0