@ephox/katamari
Advanced tools
Comparing version 2.4.22 to 2.4.23
@@ -5,5 +5,5 @@ var typeOf = function (x) { | ||
var t = typeof x; | ||
if (t === 'object' && Array.prototype.isPrototypeOf(x)) | ||
if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) | ||
return 'array'; | ||
if (t === 'object' && String.prototype.isPrototypeOf(x)) | ||
if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) | ||
return 'string'; | ||
@@ -10,0 +10,0 @@ return t; |
{ | ||
"name": "@ephox/katamari", | ||
"version": "2.4.22", | ||
"version": "2.4.23", | ||
"description": "Basic data type library", | ||
@@ -34,3 +34,3 @@ "repository": { | ||
"types": "./lib/main/ts/ephox/katamari/api/Main.d.ts", | ||
"gitHead": "274485837faa4a6fe798d3881d8ab75506437d44" | ||
"gitHead": "ded390ea447c9e7b68957b9539f3b61961e790e6" | ||
} |
const typeOf = function(x: any) { | ||
if (x === null) return 'null'; | ||
const t = typeof x; | ||
if (t === 'object' && Array.prototype.isPrototypeOf(x)) return 'array'; | ||
if (t === 'object' && String.prototype.isPrototypeOf(x)) return 'string'; | ||
if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) return 'array'; | ||
if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) return 'string'; | ||
return t; | ||
@@ -7,0 +7,0 @@ }; |
Sorry, the diff of this file is not supported yet
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
884804
565
13581