Comparing version 1.1.0 to 1.1.1
'use strict'; | ||
var typesObject = require('bson-type-of-is').typesObject; | ||
var urilib = require('url'); | ||
@@ -303,33 +304,4 @@ | ||
var types = Validator.prototype.types = {}; | ||
types.string = function testString (instance) { | ||
return typeof instance == 'string'; | ||
}; | ||
types.number = function testNumber (instance) { | ||
// isFinite returns false for NaN, Infinity, and -Infinity | ||
return typeof instance == 'number' && isFinite(instance); | ||
}; | ||
types.integer = function testInteger (instance) { | ||
return (typeof instance == 'number') && instance % 1 === 0; | ||
}; | ||
types.boolean = function testBoolean (instance) { | ||
return typeof instance == 'boolean'; | ||
}; | ||
types.array = function testArray (instance) { | ||
return instance instanceof Array; | ||
}; | ||
types['null'] = function testNull (instance) { | ||
return instance === null; | ||
}; | ||
types.date = function testDate (instance) { | ||
return instance instanceof Date; | ||
}; | ||
types.any = function testAny (instance) { | ||
return true; | ||
}; | ||
types.object = function testObject (instance) { | ||
// TODO: fix this - see #15 | ||
return instance && (typeof instance) === 'object' && !(instance instanceof Array) && !(instance instanceof Date); | ||
}; | ||
var types = Validator.prototype.types = typesObject; | ||
module.exports = Validator; |
{ | ||
"author": "Tom de Grunt <tom@degrunt.nl>", | ||
"name": "bsonschema", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"license": "MIT", | ||
"dependencies": { | ||
"bson-type-of-is": "^1.3.0" | ||
}, | ||
"contributors": [ | ||
{ "name" : "Austin Wright" } | ||
{ | ||
"name": "Austin Wright" | ||
} | ||
], | ||
@@ -11,0 +14,0 @@ "main": "./lib", |
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
70411
1
1911
+ Addedbson-type-of-is@^1.3.0
+ Addedbson-type-of-is@1.3.2(transitive)