Comparing version 0.1.1 to 0.1.2
@@ -5,3 +5,3 @@ { | ||
"keywords": ["unidecode","unicode","utf8"], | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"homepage": "http://blog.fgribreau.com/2012/05/unidecode-for-javascript-nodejs.html", | ||
@@ -8,0 +8,0 @@ "dependencies": { }, |
@@ -31,7 +31,15 @@ /** | ||
// (18) 18 > h < 1e (30) | ||
if (h > 24 && h < 30) return ''; | ||
//(d7) 215 > h < 249 (f9) no supported | ||
if(h > 215 && h < 249) return ''; | ||
if (h > 215 && h < 249) return ''; | ||
if (!tr[h]) { | ||
tr[h] = require("./data/x" + dec2hex(h) + ".js"); | ||
try { | ||
tr[h] = require("./data/x" + dec2hex(h) + ".js"); | ||
} catch (e) { | ||
console.error("Unidecode file not found for h=", h); | ||
return ''; | ||
} | ||
} | ||
@@ -44,3 +52,3 @@ | ||
function dec2hex(i) { | ||
return (i+0x100).toString(16).substr(-2); | ||
return (i + 0x100).toString(16).substr(-2); | ||
} | ||
@@ -90,2 +98,3 @@ | ||
/* From php.js */ | ||
function ord(string) { | ||
@@ -92,0 +101,0 @@ // Returns the codepoint value of a character |
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
318632
1343