@0x/assert
Advanced tools
Comparing version
[ | ||
{ | ||
"version": "2.0.9", | ||
"changes": [ | ||
{ | ||
"note": "Dependencies updated" | ||
} | ||
], | ||
"timestamp": 1554997931 | ||
}, | ||
{ | ||
"timestamp": 1553183790, | ||
@@ -4,0 +13,0 @@ "version": "2.0.8", |
@@ -8,2 +8,6 @@ <!-- | ||
## v2.0.9 - _April 11, 2019_ | ||
* Dependencies updated | ||
## v2.0.8 - _March 21, 2019_ | ||
@@ -10,0 +14,0 @@ |
@@ -55,7 +55,7 @@ "use strict"; | ||
doesConformToSchema: function (variableName, value, schema, subSchemas) { | ||
if (_.isUndefined(value)) { | ||
if (value === undefined) { | ||
throw new Error(variableName + " can't be undefined"); | ||
} | ||
var schemaValidator = new json_schemas_1.SchemaValidator(); | ||
if (!_.isUndefined(subSchemas)) { | ||
if (subSchemas !== undefined) { | ||
_.map(subSchemas, schemaValidator.addSchema.bind(schemaValidator)); | ||
@@ -69,7 +69,7 @@ } | ||
isWebUri: function (variableName, value) { | ||
var isValidUrl = !_.isUndefined(validUrl.isWebUri(value)); | ||
var isValidUrl = validUrl.isWebUri(value) !== undefined; | ||
exports.assert.assert(isValidUrl, exports.assert.typeAssertionMessage(variableName, 'web uri', value)); | ||
}, | ||
isUri: function (variableName, value) { | ||
var isValidUri = !_.isUndefined(validUrl.isUri(value)); | ||
var isValidUri = validUrl.isUri(value) !== undefined; | ||
exports.assert.assert(isValidUri, exports.assert.typeAssertionMessage(variableName, 'uri', value)); | ||
@@ -76,0 +76,0 @@ }, |
{ | ||
"name": "@0x/assert", | ||
"version": "2.0.8", | ||
"version": "2.0.9", | ||
"engines": { | ||
@@ -15,2 +15,3 @@ "node": ">=6.12" | ||
"lint": "tslint --format stylish --project .", | ||
"fix": "tslint --fix --format stylish --project .", | ||
"run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js --exit", | ||
@@ -33,3 +34,3 @@ "test": "yarn run_mocha", | ||
"devDependencies": { | ||
"@0x/tslint-config": "^3.0.0", | ||
"@0x/tslint-config": "^3.0.1", | ||
"@types/lodash": "4.14.104", | ||
@@ -49,5 +50,5 @@ "@types/mocha": "^2.2.42", | ||
"dependencies": { | ||
"@0x/json-schemas": "^3.0.8", | ||
"@0x/typescript-typings": "^4.2.1", | ||
"@0x/utils": "^4.3.0", | ||
"@0x/json-schemas": "^3.0.9", | ||
"@0x/typescript-typings": "^4.2.2", | ||
"@0x/utils": "^4.3.1", | ||
"lodash": "^4.17.11", | ||
@@ -59,3 +60,3 @@ "valid-url": "^1.0.9" | ||
}, | ||
"gitHead": "0f45409b4d481b72280db4eb872c0c72beeea504" | ||
"gitHead": "c78a60299053f0ec825bf34dd3ea0cea7bb9365b" | ||
} |
Sorry, the diff of this file is not supported yet
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
51697
56.29%12
20%812
47.1%1
Infinity%Updated
Updated