We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4e74b8 commit e363378Copy full SHA for e363378
lib/parsers/string.js
@@ -1,15 +1,15 @@
1
var Iconv = require('iconv-lite');
2
3
-var NODE_ENCODING = [
4
- 'ascii',
5
- 'utf8',
6
- 'utf16le',
7
- 'ucs2',
8
- 'base64',
9
- 'latin1',
10
- 'binary',
11
- 'hex'
12
-];
+var NODE_ENCODING = {
+ 'ascii': true,
+ 'utf8': true,
+ 'utf16le': true,
+ 'ucs2': true,
+ 'base64': true,
+ 'latin1': true,
+ 'binary': true,
+ 'hex': true
+};
13
14
exports.decode = function(buffer, encoding, options) {
15
if (NODE_ENCODING[encoding]) {
0 commit comments