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 0.1.5 to 0.1.6

11

index.js

@@ -29,3 +29,12 @@ /* exported findRefs, isJsonReference, isRemotePointer, pathFromPointer, pathToPointer, resolveRefs */

var _ = require('lodash');
var _ = {
cloneDeep: require('lodash-compat/lang/cloneDeep'),
each: require('lodash-compat/collection/each'),
isArray: require('lodash-compat/lang/isArray'),
isFunction: require('lodash-compat/lang/isFunction'),
isPlainObject: require('lodash-compat/lang/isPlainObject'),
isString: require('lodash-compat/lang/isString'),
isUndefined: require('lodash-compat/lang/isUndefined'),
map: require('lodash-compat/collection/map'),
};
var request = require('superagent');

@@ -32,0 +41,0 @@ var traverse = require('traverse');

4

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

@@ -43,3 +43,3 @@ "main": "index.js",

"dependencies": {
"lodash": "~3.0.0",
"lodash-compat": "^3.5.0",
"superagent": "~0.21.0",

@@ -46,0 +46,0 @@ "traverse": "~0.6.6"

@@ -50,3 +50,3 @@ # json-refs

```js
var jsRefs = require('jsonRefs');
var jsRefs = require('json-refs');
```

@@ -131,4 +131,5 @@

**Example**
##Usage
###Node.js
```js

@@ -148,3 +149,63 @@ var json = {

###Browser
**Bower**
```html
<html>
<head>
<title>Bower Example</title>
<script src="bower_components/lodash/lodash.js"></script>
<script src="bower_components/superagent/superagent.js"></script>
<script src="bower_components/traverse/traverse.js"></script>
<script src="bower_components/json-refs/browser/json-refs.js"></script>
</head>
<body>
</body>
<script>
var json = {
name: 'json-refs',
owner: {
$ref: 'https://api.github.com/repos/whitlockjc/json-refs#/owner'
}
};
JsonRefs.resolveRefs(json, function (err, rJson) {
if (err) throw err;
console.log(rJson);
});
</script>
</html>
```
**Standalone**
```html
<html>
<head>
<title>Standalone Example</title>
<script src="json-refs-standalone.js"></script>
</head>
<body>
</body>
<script>
var json = {
name: 'json-refs',
owner: {
$ref: 'https://api.github.com/repos/whitlockjc/json-refs#/owner'
}
};
JsonRefs.resolveRefs(json, function (err, rJson) {
if (err) throw err;
console.log(rJson);
});
</script>
</html>
```
[bower]: http://bower.io/
[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