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'); |
{ | ||
"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 |
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
16883
272
209
+ Addedlodash-compat@^3.5.0
+ Addedlodash-compat@3.10.2(transitive)
- Removedlodash@~3.0.0
- Removedlodash@3.0.1(transitive)