Comparing version 2.0.6 to 2.0.7
34
index.js
@@ -35,3 +35,3 @@ /* | ||
var dirname = require('path').dirname; | ||
var pathLoader = require('path-loader'); | ||
var PathLoader = require('path-loader'); | ||
var qs = require('querystring'); | ||
@@ -272,18 +272,20 @@ var slash = require('slash'); | ||
// Merge each reference into the root document's references | ||
Object.keys(document.refs).forEach(function (cRefPtr) { | ||
var fPtr = pathToPtr(pathFromPtr(refPtr).concat(pathFromPtr(cRefPtr))); | ||
var refDetails = refs[fPtr]; | ||
if (Object.keys(refs).length > 0) { | ||
// Merge each reference into the root document's references | ||
Object.keys(document.refs).forEach(function (cRefPtr) { | ||
var fPtr = pathToPtr(pathFromPtr(refPtr).concat(pathFromPtr(cRefPtr))); | ||
var refDetails = refs[fPtr]; | ||
if (isType(refDetails, 'Undefined')) { | ||
refs[fPtr] = document.refs[cRefPtr]; | ||
} | ||
}); | ||
if (isType(refDetails, 'Undefined')) { | ||
refs[fPtr] = document.refs[cRefPtr]; | ||
} | ||
}); | ||
// Record the value of the remote reference | ||
refs[refPtr].value = document.value; | ||
// Record the value of the remote reference | ||
refs[refPtr].value = document.value; | ||
// Mark the remote reference itself as circular | ||
if (document.circular) { | ||
refs[refPtr].circular = true; | ||
// Mark the remote reference itself as circular | ||
if (document.circular) { | ||
refs[refPtr].circular = true; | ||
} | ||
} | ||
@@ -361,4 +363,4 @@ }); | ||
// Attempt to load the resource using path-loader | ||
allTasks = pathLoader.load(url, loaderOptions); | ||
// Attempt to load the resource using path-loader | ||
allTasks = PathLoader.load(decodeURI(url), loaderOptions); | ||
@@ -365,0 +367,0 @@ // Update the cache |
{ | ||
"name": "json-refs", | ||
"version": "2.0.6", | ||
"version": "2.0.7", | ||
"description": "Various utilities for JSON References (http://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03).", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -21,4 +21,6 @@ # json-refs | ||
The documentation for this project can be found at <https://github.com/whitlockjc/json-refs/blob/master/docs/README.md>. | ||
Specific documentation can be found here: | ||
The API can be found at <https://github.com/whitlockjc/json-refs/blob/master/docs/API.md>. | ||
* API documentation can be found at <https://github.com/whitlockjc/json-refs/blob/master/docs/API.md> | ||
* CLI can be found at <https://github.com/whitlockjc/json-refs/blob/master/docs/CLI.md> | ||
@@ -35,2 +37,4 @@ ## Installation | ||
Installation is standard fare: | ||
``` | ||
@@ -40,2 +44,11 @@ bower install json-refs --save | ||
To use the Bower install, your HTML includes might look like this: | ||
``` html | ||
<!-- ... --> | ||
<script src="bower_components/path-loader/browser/path-loader-min.js"></script> | ||
<script src="bower_components/json-refs/browser/json-refs-min.js"></script> | ||
<!-- ... --> | ||
``` | ||
#### Standalone Binaries | ||
@@ -45,6 +58,15 @@ | ||
* [json-refs-standalone.js](https://raw.github.com/whitlockjc/json-refs/master/browser/json-refs-standalone.js): _400_, full source source maps | ||
* [json-refs-standalone-min.js](https://raw.github.com/whitlockjc/json-refs/master/browser/json-refs-standalone-min.js): _44kb_, minified, compressed | ||
* [json-refs-standalone.js](https://raw.github.com/whitlockjc/json-refs/master/browser/json-refs-standalone.js): _424kb_, full source source maps | ||
* [json-refs-standalone-min.js](https://raw.github.com/whitlockjc/json-refs/master/browser/json-refs-standalone-min.js): _48kb_, minified, compressed | ||
and no sourcemap | ||
Of course, these links are for the master builds so feel free to download from the release of your choice. Once you've | ||
gotten them downloaded, to use the standalone binaries, your HTML include might look like this: | ||
``` html | ||
<!-- ... --> | ||
<script src="json-refs-standalone.js"></script> | ||
<!-- ... --> | ||
``` | ||
### Node.js | ||
@@ -51,0 +73,0 @@ |
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
49166
1142
82