Comparing version 1.12.0 to 1.13.0
12
extra.js
@@ -31,2 +31,13 @@ var NATIVE = require('./native') | ||
function Range (a, b, f) { | ||
f = f || NATIVE.Number | ||
function _range (value, strict) { | ||
return f(value) && (value > a) && (value < b) | ||
} | ||
_range.toJSON = function () { | ||
return `${f.toJSON()} between [${a}, ${b}]` | ||
} | ||
return _range | ||
} | ||
var UINT53_MAX = Math.pow(2, 53) - 1 | ||
@@ -60,2 +71,3 @@ | ||
Int32: Int32, | ||
Range: Range, | ||
StringN: _StringN, | ||
@@ -62,0 +74,0 @@ UInt8: UInt8, |
{ | ||
"name": "typeforce", | ||
"version": "1.12.0", | ||
"version": "1.13.0", | ||
"description": "Another biased type checking solution for Javascript", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
16214
359