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

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 3.0.12 to 3.0.13

dist/json-refs-min.js

12

index.d.ts

@@ -33,7 +33,7 @@ /**

* @param options - The JsonRefs options
* @returns an object whose keys are JSON Pointers *(fragment version)* to where the JSON Reference is defined
* and whose values are {@link UnresolvedRefDetails}.
* @returns an object whose keys are JSON Pointers
* *(fragment version)* to where the JSON Reference is defined and whose values are {@link UnresolvedRefDetails}.
* @throws when the input arguments fail validation or if `options.subDocPath` points to an invalid location
*/
export function findRefs(obj: any[] | object, options?: JsonRefsOptions): object;
export function findRefs(obj: any[] | object, options?: JsonRefsOptions): { [key: string]: (UnresolvedRefDetails|undefined) };

@@ -129,4 +129,4 @@ /**

*
* This API is identical to {@link module:json-refs.resolveRefs} except this API will retrieve a remote document and
* then return the result of {@link module:json-refs.resolveRefs} on the retrieved document.
* This API is identical to {@link resolveRefs} except this API will retrieve a remote document and
* then return the result of {@link resolveRefs} on the retrieved document.
* @param location - The location to retrieve *(Can be relative or absolute, just make sure you look at the

@@ -149,3 +149,3 @@ * {@link JsonRefsOptions|options documentation} to see how relative references are handled.)*

* References *(If this value is a single string or an array of strings, the value(s) are expected to be the `type(s)`
* you are interested in collecting as described in {@link module:json-refs.getRefDetails}. If it is a function, it is
* you are interested in collecting as described in {@link getRefDetails}. If it is a function, it is
* expected that the function behaves like {@link RefDetailsFilter}.)*

@@ -152,0 +152,0 @@ */

@@ -1166,6 +1166,6 @@ /*

* @param {array|object} obj - The structure to find JSON References within
* @param {module:json-refs~JsonRefsOptions} [options] - The JsonRefs options
* @param {module:json-refs.JsonRefsOptions} [options] - The JsonRefs options
*
* @returns {object} an object whose keys are JSON Pointers *(fragment version)* to where the JSON Reference is defined
* and whose values are {@link UnresolvedRefDetails}.
* @returns {Object.<string, module:json-refs.UnresolvedRefDetails|undefined>} an object whose keys are JSON Pointers
* *(fragment version)* to where the JSON Reference is defined and whose values are {@link UnresolvedRefDetails}.
*

@@ -1193,7 +1193,7 @@ * @throws {Error} when the input arguments fail validation or if `options.subDocPath` points to an invalid location

* @param {string} location - The location to retrieve *(Can be relative or absolute, just make sure you look at the
* {@link module:json-refs~JsonRefsOptions|options documentation} to see how relative references are handled.)*
* @param {module:json-refs~JsonRefsOptions} [options] - The JsonRefs options
* {@link module:json-refs.JsonRefsOptions|options documentation} to see how relative references are handled.)*
* @param {module:json-refs.JsonRefsOptions} [options] - The JsonRefs options
*
* @returns {Promise<module:json-refs~RetrievedRefsResults>} a promise that resolves a
* {@link module:json-refs~RetrievedRefsResults} and rejects with an `Error` when the input arguments fail validation,
* @returns {Promise<module:json-refs.RetrievedRefsResults>} a promise that resolves a
* {@link module:json-refs.RetrievedRefsResults} and rejects with an `Error` when the input arguments fail validation,
* when `options.subDocPath` points to an invalid location or when the location argument points to an unloadable

@@ -1225,3 +1225,3 @@ * resource

*
* @returns {module:json-refs~UnresolvedRefDetails} the detailed information
* @returns {module:json-refs.UnresolvedRefDetails} the detailed information
*/

@@ -1337,6 +1337,6 @@ module.exports.getRefDetails = function (obj) {

* @param {array|object} obj - The structure to find JSON References within
* @param {module:json-refs~JsonRefsOptions} [options] - The JsonRefs options
* @param {module:json-refs.JsonRefsOptions} [options] - The JsonRefs options
*
* @returns {Promise<module:json-refs~ResolvedRefsResults>} a promise that resolves a
* {@link module:json-refs~ResolvedRefsResults} and rejects with an `Error` when the input arguments fail validation,
* @returns {Promise<module:json-refs.ResolvedRefsResults>} a promise that resolves a
* {@link module:json-refs.ResolvedRefsResults} and rejects with an `Error` when the input arguments fail validation,
* when `options.subDocPath` points to an invalid location or when the location argument points to an unloadable

@@ -1370,7 +1370,7 @@ * resource

* @param {string} location - The location to retrieve *(Can be relative or absolute, just make sure you look at the
* {@link module:json-refs~JsonRefsOptions|options documentation} to see how relative references are handled.)*
* @param {module:json-refs~JsonRefsOptions} [options] - The JsonRefs options
* {@link module:json-refs.JsonRefsOptions|options documentation} to see how relative references are handled.)*
* @param {module:json-refs.JsonRefsOptions} [options] - The JsonRefs options
*
* @returns {Promise<module:json-refs~RetrievedResolvedRefsResults>} a promise that resolves a
* {@link module:json-refs~RetrievedResolvedRefsResults} and rejects with an `Error` when the input arguments fail
* @returns {Promise<module:json-refs.RetrievedResolvedRefsResults>} a promise that resolves a
* {@link module:json-refs.RetrievedResolvedRefsResults} and rejects with an `Error` when the input arguments fail
* validation, when `options.subDocPath` points to an invalid location or when the location argument points to an

@@ -1377,0 +1377,0 @@ * unloadable resource

{
"name": "json-refs",
"version": "3.0.12",
"version": "3.0.13",
"description": "Various utilities for JSON References (http://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03).",
"main": "index.js",
"scripts": {
"test": "node ./node_modules/gulp/bin/gulp.js test"
"gulp": "gulp",
"test": "gulp test"
},

@@ -26,5 +27,5 @@ "author": {

"bin",
"dist",
"index.d.ts",
"index.js",
"LICENSE"
"index.js"
],

@@ -42,13 +43,13 @@ "types": "./index.d.ts",

"devDependencies": {
"@babel/core": "^7.2.2",
"@babel/preset-env": "^7.2.3",
"@otris/jsdoc-tsd": "^1.0.4",
"brfs": "~1.4.3",
"browserify": "~14.4.0",
"connect": "^3.6.1",
"babel-loader": "^8.0.5",
"brfs": "~2.0.1",
"connect": "^3.6.6",
"del": "^3.0.0",
"exposify": "~0.5.0",
"gulp": "~3.9.1",
"gulp-concat": "^2.6.1",
"gulp-eslint": "^4.0.0",
"gulp-if": "^2.0.2",
"gulp-istanbul": "~1.1.1",
"gulp-eslint": "^5.0.0",
"gulp-istanbul": "~1.1.3",
"gulp-jsdoc-to-markdown": "^1.2.2",

@@ -58,27 +59,25 @@ "gulp-jsdoc3": "^2.0.0",

"gulp-mocha": "~3.0.1",
"gulp-nsp": "^2.4.2",
"gulp-replace": "^1.0.0",
"gulp-uglify": "^3.0.0",
"karma": "^1.6.0",
"jsdoc": "^3.5.5",
"karma": "^3.1.4",
"karma-mocha": "^1.3.0",
"karma-mocha-reporter": "^2.2.3",
"karma-mocha-reporter": "^2.2.5",
"karma-phantomjs-launcher": "^1.0.4",
"lodash": "^4.17.4",
"karma-webpack": "^4.0.0-rc.5",
"mocha": "^4.0.1",
"phantomjs-prebuilt": "^2.1.14",
"run-sequence": "^2.2.0",
"uglifyify": "~4.0.4",
"vinyl-buffer": "^1.0.0",
"vinyl-source-stream": "~1.1.0"
"phantomjs-prebuilt": "^2.1.16",
"run-sequence": "^2.2.1",
"transform-loader": "^0.2.4",
"webpack": "^4.28.1"
},
"dependencies": {
"commander": "~2.11.0",
"graphlib": "^2.1.1",
"js-yaml": "^3.10.0",
"lodash": "^4.17.4",
"commander": "~2.19.0",
"graphlib": "^2.1.7",
"js-yaml": "^3.13.0",
"lodash": "^4.17.11",
"native-promise-only": "^0.8.1",
"path-loader": "^1.0.5",
"slash": "^1.0.0",
"uri-js": "^3.0.2"
"path-loader": "^1.0.10",
"slash": "^2.0.0",
"uri-js": "^4.2.2"
}
}

@@ -32,30 +32,7 @@ # json-refs

Installation for browser applications can be done via [Bower][bower] or by downloading a standalone binary.
json-refs binaries for the browser are available in the `dist/` directory:
#### Using Bower
* [json-refs.js](https://raw.github.com/whitlockjc/json-refs/master/dist/json-refs.js): _2,292kb_, full source source maps
* [json-refs-min.js](https://raw.github.com/whitlockjc/json-refs/master/dist/json-refs-min.js): _148kb_, minified, compressed and no sourcemap
Installation is standard fare:
```
bower install json-refs --save
```
To use the Bower install, your HTML includes might look like this:
``` html
<!-- ... -->
<script src="bower_components/lodash/dist/lodash.min.js"></script>
<script src="bower_components/graphlib/dist/graphlib.core.min.js"></script>
<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
The standalone binaries come in two flavors:
* [json-refs-standalone.js](https://raw.github.com/whitlockjc/json-refs/master/browser/json-refs-standalone.js): _1,904kb_, full source source maps
* [json-refs-standalone-min.js](https://raw.github.com/whitlockjc/json-refs/master/browser/json-refs-standalone-min.js): _140kb_, 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

@@ -66,3 +43,3 @@ gotten them downloaded, to use the standalone binaries, your HTML include might look like this:

<!-- ... -->
<script src="json-refs-standalone.js"></script>
<script src="json-refs.js"></script>
<!-- ... -->

@@ -87,5 +64,4 @@ ```

[bower]: http://bower.io/
[npm]: https://www.npmjs.com/
[json-reference-draft-spec]: http://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03
[json-pointer-spec]: http://tools.ietf.org/html/rfc6901
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