Comparing version 0.5.4 to 0.6.0
@@ -302,3 +302,3 @@ // Copyright 2012 The Obvious Corporation. | ||
function isUint(x) { | ||
function isUInt(x) { | ||
return isInt(x) && (x >= 0); | ||
@@ -390,4 +390,4 @@ } | ||
function assertUint(x) { | ||
if (!isUint(x)) { | ||
function assertUInt(x) { | ||
if (!isUInt(x)) { | ||
failType(x, UINT); | ||
@@ -428,3 +428,3 @@ } | ||
assertString: assertString, | ||
assertUint: assertUint, | ||
assertUInt: assertUInt, | ||
assertUndefined: assertUndefined, | ||
@@ -448,4 +448,4 @@ | ||
isString: isString, | ||
isUint: isUint, | ||
isUInt: isUInt, | ||
isUndefined: isUndefined | ||
}; |
{ | ||
"name": "typ", | ||
"version": "0.5.4", | ||
"version": "0.6.0", | ||
"keywords": | ||
@@ -5,0 +5,0 @@ ["type", "assert", "predicate"], |
@@ -42,3 +42,3 @@ // Copyright 2012 The Obvious Corporation. | ||
{ assert: typ.assertString, predicate: typ.isString }, | ||
{ assert: typ.assertUint, predicate: typ.isUint }, | ||
{ assert: typ.assertUInt, predicate: typ.isUInt }, | ||
{ assert: typ.assertUndefined, predicate: typ.isUndefined }, | ||
@@ -79,5 +79,5 @@ ]; | ||
// numbers | ||
{ v: 0, p: [typ.isInt, typ.isUint, typ.isNumber, typ.isDefined] }, | ||
{ v: 10, p: [typ.isInt, typ.isUint, typ.isNumber, typ.isDefined] }, | ||
{ v: 1e200, p: [typ.isInt, typ.isUint, typ.isNumber, typ.isDefined] }, | ||
{ v: 0, p: [typ.isInt, typ.isUInt, typ.isNumber, typ.isDefined] }, | ||
{ v: 10, p: [typ.isInt, typ.isUInt, typ.isNumber, typ.isDefined] }, | ||
{ v: 1e200, p: [typ.isInt, typ.isUInt, typ.isNumber, typ.isDefined] }, | ||
{ v: -1, p: [typ.isInt, typ.isNumber, typ.isDefined] }, | ||
@@ -84,0 +84,0 @@ { v: -12345, p: [typ.isInt, typ.isNumber, typ.isDefined] }, |
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