Socket
Socket
Sign inDemoInstall

json-refs

Package Overview
Dependencies
Maintainers
1
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-refs - npm Package Compare versions

Comparing version 2.0.5 to 2.0.6

41

index.js

@@ -551,5 +551,5 @@ /*

* {@link https://github.com/whitlockjc/path-loader/blob/master/docs/API.md#module_PathLoader.load|PathLoader~load}
* @param {RefPreProcessor} [refPreProcessor] - The callback used to pre-process a JSON Reference like
* @param {module:JsonRefs~RefPreProcessor} [refPreProcessor] - The callback used to pre-process a JSON Reference like
* object *(This is called prior to validating the JSON Reference like object and getting its details)*
* @param {RefPostProcessor} [refPostProcessor] - The callback used to post-process the JSON Reference
* @param {module:JsonRefs~RefPostProcessor} [refPostProcessor] - The callback used to post-process the JSON Reference
* metadata *(This is called prior filtering the references)*

@@ -569,3 +569,3 @@ * @param {string} [options.relativeBase] - The base location to use when resolving relative references *(Only useful

*
* @param {UnresolvedRefDetails} refDetails - The JSON Reference details to test
* @param {module:JsonRefs~UnresolvedRefDetails} refDetails - The JSON Reference details to test
* @param {string[]} path - The path to the JSON Reference

@@ -592,3 +592,3 @@ *

*
* @param {UnresolvedRefDetails} refDetails - The JSON Reference details to test
* @param {module:JsonRefs~UnresolvedRefDetails} refDetails - The JSON Reference details to test
* @param {string[]} path - The path to the JSON Reference

@@ -616,3 +616,3 @@ *

*
* @property {ResolvedRefDetails} refs - An object whose keys are JSON Pointers *(fragment version)*
* @property {module:JsonRefs~ResolvedRefDetails} refs - An object whose keys are JSON Pointers *(fragment version)*
* to where the JSON Reference is defined and whose values are {@link module:JsonRefs~ResolvedRefDetails}

@@ -627,3 +627,3 @@ * @property {object} value - The array/object with its JSON References fully resolved

*
* @property {UnresolvedRefDetails} refs - An object whose keys are JSON Pointers *(fragment version)*
* @property {module:JsonRefs~UnresolvedRefDetails} refs - An object whose keys are JSON Pointers *(fragment version)*
* to where the JSON Reference is defined and whose values are {@link module:JsonRefs~UnresolvedRefDetails}

@@ -639,3 +639,3 @@ * @property {object} value - The retrieved document

*
* @property {UnresolvedRefDetails} refs - An object whose keys are JSON Pointers *(fragment version)*
* @property {module:JsonRefs~UnresolvedRefDetails} refs - An object whose keys are JSON Pointers *(fragment version)*
* to where the JSON Reference is defined and whose values are {@link module:JsonRefs~UnresolvedRefDetails}

@@ -731,3 +731,3 @@ * @property {ResolvedRefsResults} - An object whose keys are JSON Pointers *(fragment version)*

* @param {array|object} obj - The structure to find JSON References within
* @param {JsonRefsOptions} [options] - The JsonRefs options
* @param {module:JsonRefs~JsonRefsOptions} [options] - The JsonRefs options
*

@@ -825,3 +825,3 @@ * @returns {object} an object whose keys are JSON Pointers *(fragment version)* to where the JSON Reference is defined

* {@link module:JsonRefs~JsonRefsOptions|options documentation} to see how relative references are handled.)*
* @param {JsonRefsOptions} [options] - The JsonRefs options
* @param {module:JsonRefs~JsonRefsOptions} [options] - The JsonRefs options
*

@@ -901,3 +901,3 @@ * @returns {Promise} a promise that resolves a {@link module:JsonRefs~RetrievedRefsResults} and rejects with an

*
* @returns {UnresolvedRefDetails} the detailed information
* @returns {module:JsonRefs~UnresolvedRefDetails} the detailed information
*

@@ -1104,3 +1104,3 @@ * @alias module:JsonRefs.getRefDetails

* @param {array|object} obj - The structure to find JSON References within
* @param {JsonRefsOptions} [options] - The JsonRefs options
* @param {module:JsonRefs~JsonRefsOptions} [options] - The JsonRefs options
*

@@ -1155,2 +1155,3 @@ * @returns {Promise} a promise that resolves a {@link module:JsonRefs~ResolvedRefsResults} and rejects with an

Object.keys(aRefs).forEach(function (refPtr) {
var ptrPath = pathFromPtr(refPtr);
var refDetails = aRefs[refPtr];

@@ -1165,5 +1166,10 @@ var value;

pathFromPtr(refDetails.uriDetails.fragment) :
[]);
setValue(cloned, pathFromPtr(refPtr), value);
[]);
if (ptrPath.length === 0) {
cloned = value;
} else {
setValue(cloned, pathFromPtr(refPtr), value);
}
// The reference includes a fragment so update the reference details

@@ -1189,2 +1195,3 @@ if (!isType(refDetails.value, 'Undefined')) {

var refDetails = aRefs[refPtr];
var refPath = pathFromPtr(refPtr);
var parentLocation = refDetails.parentLocation;

@@ -1221,3 +1228,7 @@ var value;

setValue(cloned, pathFromPtr(refPtr), value);
if (refPath.length === 0) {
cloned = value;
} else {
setValue(cloned, pathFromPtr(refPtr), value);
}

@@ -1257,3 +1268,3 @@ refDetails.value = value;

* {@link module:JsonRefs~JsonRefsOptions|options documentation} to see how relative references are handled.)*
* @param {JsonRefsOptions} [options] - The JsonRefs options
* @param {module:JsonRefs~JsonRefsOptions} [options] - The JsonRefs options
*

@@ -1260,0 +1271,0 @@ * @returns {Promise} a promise that resolves a {@link module:JsonRefs~RetrievedResolvedRefsResults} and rejects with an

{
"name": "json-refs",
"version": "2.0.5",
"version": "2.0.6",
"description": "Various utilities for JSON References (http://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03).",

@@ -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