jschardet
Advanced tools
Comparing version 3.1.0 to 3.1.1
{ | ||
"name": "jschardet", | ||
"version": "3.1.0", | ||
"version": "3.1.1", | ||
"description": "Character encoding auto-detection in JavaScript (port of python's chardet)", | ||
@@ -5,0 +5,0 @@ "author": "António Afonso", |
@@ -50,9 +50,3 @@ /* | ||
]; | ||
const supportedCharsetNames = (function() { | ||
const charsetNames = []; | ||
for (const prober of this._mProbers) { | ||
charsetNames.push(prober.getCharsetName()) | ||
} | ||
return charsetNames; | ||
}); | ||
const supportedCharsetNames = this._mProbers.map(prober => prober.getCharsetName()); | ||
this.getSupportedCharsetNames = function() { | ||
@@ -59,0 +53,0 @@ return supportedCharsetNames; |
@@ -72,4 +72,7 @@ /* | ||
if (!options) options = {}; | ||
if (!options.minimumThreshold) options.minimumThreshold = 0.20; | ||
if (typeof options.minimumThreshold !== "number") { | ||
options.minimumThreshold = 0.20; | ||
} | ||
if (options.detectEncodings) { | ||
@@ -102,3 +105,4 @@ for (const encoding of options.detectEncodings) { | ||
} | ||
return options.detectEncodings.includes(encoding.toLowerCase()); | ||
lowerDetectedEncodings = options.detectEncodings.map(encoding => encoding.toLowerCase()); | ||
return lowerDetectedEncodings.includes(encoding.toLowerCase()); | ||
} | ||
@@ -105,0 +109,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1317722
57
16251