encoding
Advanced tools
Comparing version 0.1.2 to 0.1.3
16
index.js
@@ -34,5 +34,17 @@ var Iconv, iconvLite = require("iconv-lite");; | ||
if(Iconv && !useLite){ | ||
result = convertIconv(str, to, from); | ||
try{ | ||
result = convertIconv(str, to, from); | ||
}catch(E){ | ||
try{ | ||
result = convertIconvLite(str, to, from); | ||
}catch(E){ | ||
result = str; | ||
} | ||
} | ||
}else{ | ||
result = convertIconvLite(str, to, from); | ||
try{ | ||
result = convertIconvLite(str, to, from); | ||
}catch(E){ | ||
result = str; | ||
} | ||
} | ||
@@ -39,0 +51,0 @@ } |
{ | ||
"name": "encoding", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "Remove accents from international characters", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
5509
122