reshow-runtime
Advanced tools
Comparing version 0.0.6 to 0.0.7
@@ -1,2 +0,2 @@ | ||
var getTypeOf = function getTypeOf(val) { | ||
var getTypeOf = function getTypeOf(val, name) { | ||
if (Number.isNaN(val)) { | ||
@@ -6,5 +6,8 @@ return 'NaN'; | ||
try { | ||
return Object.getPrototypeOf(val).constructor.name; | ||
if (!name) { | ||
name = Object.getPrototypeOf(val).constructor.name.toLowerCase(); | ||
} | ||
return name; | ||
} catch (ex) { | ||
return Object.prototype.toString.call(val).replace(/^\[object\s(.*)\]$/, '$1'); | ||
return Object.prototype.toString.call(val).replace(/^\[object\s(.*)\]$/, '$1').toLowerCase(); | ||
} | ||
@@ -11,0 +14,0 @@ }; |
@@ -6,3 +6,3 @@ 'use strict'; | ||
}); | ||
var getTypeOf = function getTypeOf(val) { | ||
var getTypeOf = function getTypeOf(val, name) { | ||
if (Number.isNaN(val)) { | ||
@@ -12,5 +12,8 @@ return 'NaN'; | ||
try { | ||
return Object.getPrototypeOf(val).constructor.name; | ||
if (!name) { | ||
name = Object.getPrototypeOf(val).constructor.name.toLowerCase(); | ||
} | ||
return name; | ||
} catch (ex) { | ||
return Object.prototype.toString.call(val).replace(/^\[object\s(.*)\]$/, '$1'); | ||
return Object.prototype.toString.call(val).replace(/^\[object\s(.*)\]$/, '$1').toLowerCase(); | ||
} | ||
@@ -17,0 +20,0 @@ }; |
{ | ||
"name": "reshow-runtime", | ||
"version": "0.0.6", | ||
"modules.root": "es", | ||
"version": "0.0.7", | ||
"description": "Babel runtime alternative", | ||
@@ -11,3 +10,13 @@ "repository": "react-atomic/reshow", | ||
"author": "Hill <hill@kimo.com>", | ||
"license": "MIT" | ||
"license": "MIT", | ||
"devDependencies": { | ||
"chai": "*", | ||
"jsdom": "*", | ||
"jsdom-global": "*", | ||
"mocha": "*" | ||
}, | ||
"scripts": { | ||
"test": "mocha 'tests/**/*.js' -r jsdom-global/register", | ||
"prepublishOnly": "npm run test" | ||
} | ||
} |
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
34251
20
234
4