@tsdotnet/type
Advanced tools
Comparing version
@@ -88,9 +88,9 @@ /*! | ||
switch (t) { | ||
case "boolean" /* Boolean */: | ||
case "string" /* String */: | ||
case "number" /* Number */: | ||
case "boolean" /* Value.Boolean */: | ||
case "string" /* Value.String */: | ||
case "number" /* Value.Number */: | ||
return true; | ||
case "undefined" /* Undefined */: | ||
case "undefined" /* Value.Undefined */: | ||
return allowUndefined; | ||
case "object" /* Object */: | ||
case "object" /* Value.Object */: | ||
return value === null; | ||
@@ -108,3 +108,3 @@ } | ||
function isPrimitiveOrSymbol(value, allowUndefined = false) { | ||
return typeof value === "symbol" /* Symbol */ || isPrimitive(value, allowUndefined); | ||
return typeof value === "symbol" /* Value.Symbol */ || isPrimitive(value, allowUndefined); | ||
} | ||
@@ -120,5 +120,5 @@ type_1.isPrimitiveOrSymbol = isPrimitiveOrSymbol; | ||
switch (t) { | ||
case "string" /* String */: | ||
case "number" /* Number */: | ||
case "symbol" /* Symbol */: | ||
case "string" /* Value.String */: | ||
case "number" /* Value.Number */: | ||
case "symbol" /* Value.Symbol */: | ||
return true; | ||
@@ -139,3 +139,3 @@ } | ||
function isObject(value, allowNull = false) { | ||
return typeof value === "object" /* Object */ && (allowNull || value !== null); | ||
return typeof value === "object" /* Value.Object */ && (allowNull || value !== null); | ||
} | ||
@@ -216,3 +216,3 @@ type_1.isObject = isObject; | ||
function isIterable(instance) { | ||
return hasMemberOfType(instance, Symbol.iterator, "function" /* Function */); | ||
return hasMemberOfType(instance, Symbol.iterator, "function" /* Value.Function */); | ||
} | ||
@@ -219,0 +219,0 @@ type_1.isIterable = isIterable; |
@@ -91,9 +91,9 @@ "use strict"; | ||
switch (t) { | ||
case "boolean" /* Boolean */: | ||
case "string" /* String */: | ||
case "number" /* Number */: | ||
case "boolean" /* Value.Boolean */: | ||
case "string" /* Value.String */: | ||
case "number" /* Value.Number */: | ||
return true; | ||
case "undefined" /* Undefined */: | ||
case "undefined" /* Value.Undefined */: | ||
return allowUndefined; | ||
case "object" /* Object */: | ||
case "object" /* Value.Object */: | ||
return value === null; | ||
@@ -111,3 +111,3 @@ } | ||
function isPrimitiveOrSymbol(value, allowUndefined = false) { | ||
return typeof value === "symbol" /* Symbol */ || isPrimitive(value, allowUndefined); | ||
return typeof value === "symbol" /* Value.Symbol */ || isPrimitive(value, allowUndefined); | ||
} | ||
@@ -123,5 +123,5 @@ type_1.isPrimitiveOrSymbol = isPrimitiveOrSymbol; | ||
switch (t) { | ||
case "string" /* String */: | ||
case "number" /* Number */: | ||
case "symbol" /* Symbol */: | ||
case "string" /* Value.String */: | ||
case "number" /* Value.Number */: | ||
case "symbol" /* Value.Symbol */: | ||
return true; | ||
@@ -142,3 +142,3 @@ } | ||
function isObject(value, allowNull = false) { | ||
return typeof value === "object" /* Object */ && (allowNull || value !== null); | ||
return typeof value === "object" /* Value.Object */ && (allowNull || value !== null); | ||
} | ||
@@ -219,3 +219,3 @@ type_1.isObject = isObject; | ||
function isIterable(instance) { | ||
return hasMemberOfType(instance, Symbol.iterator, "function" /* Function */); | ||
return hasMemberOfType(instance, Symbol.iterator, "function" /* Value.Function */); | ||
} | ||
@@ -222,0 +222,0 @@ type_1.isIterable = isIterable; |
{ | ||
"name": "@tsdotnet/type", | ||
"version": "1.0.13", | ||
"version": "1.0.14", | ||
"description": "A set of useful utility functions for JavaScript run-time type checking and inspection.", | ||
@@ -43,21 +43,21 @@ "author": "electricessence", | ||
"devDependencies": { | ||
"@types/chai": "^4.3.0", | ||
"@types/mocha": "^9.1.0", | ||
"@types/node": "^17.0.17", | ||
"@typescript-eslint/eslint-plugin": "^5.11.0", | ||
"@typescript-eslint/parser": "^5.11.0", | ||
"chai": "^4.3.6", | ||
"@types/chai": "^4.3.4", | ||
"@types/mocha": "^10.0.1", | ||
"@types/node": "^18.11.16", | ||
"@typescript-eslint/eslint-plugin": "^5.46.1", | ||
"@typescript-eslint/parser": "^5.46.1", | ||
"chai": "^4.3.7", | ||
"copyfiles": "^2.4.1", | ||
"eslint": "^8.9.0", | ||
"eslint": "^8.30.0", | ||
"eslint-config-typescript": "^3.0.0", | ||
"eslint-plugin-import": "^2.25.4", | ||
"eslint-plugin-import": "^2.26.0", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-promise": "^6.0.0", | ||
"mocha": "^9.2.0", | ||
"eslint-plugin-promise": "^6.1.1", | ||
"mocha": "^10.2.0", | ||
"npm-run-all": "^4.1.5", | ||
"nyc": "^15.1.0", | ||
"rimraf": "^3.0.2", | ||
"ts-node": "^10.5.0", | ||
"typedoc": "^0.22.11", | ||
"typescript": "^4.5.5" | ||
"ts-node": "^10.9.1", | ||
"typedoc": "^0.23.22", | ||
"typescript": "^4.9.4" | ||
}, | ||
@@ -64,0 +64,0 @@ "dependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
37554
0.36%