Comparing version 0.6.3 to 0.6.4
'use strict'; | ||
var $ = require('./util/uri-helpers'); | ||
var $ = require('./util/helpers'); | ||
@@ -5,0 +5,0 @@ $.findByRef = require('./util/find-reference'); |
'use strict'; | ||
var $ = require('./uri-helpers'); | ||
var $ = require('./helpers'); | ||
@@ -5,0 +5,0 @@ function get(obj, path) { |
'use strict'; | ||
var $ = require('./uri-helpers'); | ||
var $ = require('./helpers'); | ||
@@ -32,3 +32,3 @@ var cloneObj = require('./clone-obj'); | ||
if (typeof value === 'object' && !(key === 'enum' || key === 'required')) { | ||
if (typeof value === 'object' && value !== null && !$.isKeyword(key)) { | ||
expand(value, parent, callback); | ||
@@ -35,0 +35,0 @@ } |
'use strict'; | ||
var $ = require('./uri-helpers'); | ||
var $ = require('./helpers'); | ||
@@ -9,6 +9,2 @@ var find = require('./find-reference'); | ||
function isKey(prop) { | ||
return prop === 'enum' || prop === 'required' || prop === 'definitions'; | ||
} | ||
function copy(obj, refs, parent, resolve) { | ||
@@ -31,3 +27,3 @@ var target = Array.isArray(obj) ? [] : {}; | ||
for (var prop in obj) { | ||
if (typeof obj[prop] === 'object' && !isKey(prop)) { | ||
if (typeof obj[prop] === 'object' && obj[prop] !== null && !$.isKeyword(prop)) { | ||
target[prop] = copy(obj[prop], refs, parent, resolve); | ||
@@ -34,0 +30,0 @@ } else { |
{ | ||
"name": "deref", | ||
"version": "0.6.3", | ||
"version": "0.6.4", | ||
"description": "JSON-Schema $ref resolution", | ||
@@ -11,8 +11,18 @@ "main": "lib/index.js", | ||
"license": "MIT", | ||
"scripts": { | ||
"dev": "jasmine-node spec --coffee --verbose --autoTest --watchFolders lib", | ||
"dev:lint": "eslint lib", | ||
"dev:spec": "jasmine-node spec --coffee --noStackTrace --captureExceptions", | ||
"cover": "istanbul cover --root lib --x '**/spec/**' -- jasmine-node --coffee spec", | ||
"cover:up": "codecov --file=coverage/lcov.info --disable=gcov -e TRAVIS_NODE_VERSION", | ||
"test": "npm run dev:lint && npm run dev:spec" | ||
}, | ||
"devDependencies": { | ||
"clone": "^0.1.19", | ||
"codecov": "^1.0.1", | ||
"eslint": "^2.3.0", | ||
"glob": "^4.5.3", | ||
"grunt": "^0.4.5", | ||
"grunt-parts": "^0.5.7", | ||
"is-my-json-valid": "^2.12.2", | ||
"is-my-json-valid": "^2.13.1", | ||
"istanbul": "^0.4.2", | ||
"jasmine-node": "2.0.0-beta4", | ||
"jayschema": "^0.3.1", | ||
@@ -19,0 +29,0 @@ "tv4": "^1.2.7", |
@@ -5,3 +5,5 @@ | ||
[![Build Status](https://travis-ci.org/json-schema-faker/deref.png?branch=master)](https://travis-ci.org/json-schema-faker/deref) [![NPM version](https://badge.fury.io/js/deref.png)](http://badge.fury.io/js/deref) [![Coverage Status](https://coveralls.io/repos/json-schema-faker/deref/badge.png?branch=master)](https://coveralls.io/r/json-schema-faker/deref?branch=master) | ||
[![Build Status](https://travis-ci.org/json-schema-faker/deref.png?branch=master)](https://travis-ci.org/json-schema-faker/deref) | ||
[![NPM version](https://badge.fury.io/js/deref.png)](http://badge.fury.io/js/deref) | ||
[![Coverage Status](https://codecov.io/github/json-schema-faker/deref/coverage.svg)](https://codecov.io/github/json-schema-faker/deref) | ||
@@ -157,1 +159,5 @@ A simple way for solving `$ref` values: | ||
Note that calling `$(schema)` will not read/download any local/remote files. | ||
[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/json-schema-faker/deref/trend.png)](https://bitdeli.com/free "Bitdeli Badge") | ||
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
13825
281
162
10