iconv-lite
Advanced tools
Comparing version 0.2.6 to 0.2.7
@@ -1,2 +0,2 @@ | ||
var gbkTable = require(__dirname + '/table/gbk.js'); | ||
var gbkTable = require('./table/gbk.js'); | ||
module.exports = { | ||
@@ -3,0 +3,0 @@ 'windows936': 'gbk', |
14
index.js
@@ -189,12 +189,12 @@ // Module exports | ||
// Load other encodings from files in /encodings dir. | ||
var encodingsDir = __dirname+"/encodings/", | ||
fs = require('fs'); | ||
fs.readdirSync(encodingsDir).forEach(function(file) { | ||
if(fs.statSync(encodingsDir + file).isDirectory()) return; | ||
var encodings = require(encodingsDir + file) | ||
// Load other encodings manually from files in /encodings dir. | ||
function applyEncodings(encodings) { | ||
for (var key in encodings) | ||
iconv.encodings[key] = encodings[key] | ||
}); | ||
} | ||
applyEncodings(require('./encodings/singlebyte')); | ||
applyEncodings(require('./encodings/gbk')); | ||
// Utilities | ||
@@ -201,0 +201,0 @@ var asciiString = '\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f'+ |
{ | ||
"name": "iconv-lite", | ||
"description": "Convert character encodings in pure javascript.", | ||
"version": "0.2.6", | ||
"version": "0.2.7", | ||
@@ -9,3 +9,3 @@ "keywords": ["iconv", "convert", "charset"], | ||
"contributors": [ | ||
"jenkinv (https://github.com/jenkinv)", | ||
"Jinwu Zhan (https://github.com/jenkinv)", | ||
"Adamansky Anton (https://github.com/adamansky)", | ||
@@ -16,2 +16,3 @@ "George Stagas (https://github.com/stagas)", | ||
"main": "index.js", | ||
"homepage": "https://github.com/ashtuchkin/iconv-lite", | ||
@@ -18,0 +19,0 @@ "repository": { |
@@ -42,6 +42,6 @@ iconv-lite - pure javascript character encoding conversion | ||
operation iconv@1.1.3 iconv-lite@0.2.4 | ||
operation iconv@1.2.4 iconv-lite@0.2.4 | ||
---------------------------------------------------------- | ||
encode('win1251') ~36 Mb/s ~230 Mb/s | ||
decode('win1251') ~38 Mb/s ~130 Mb/s | ||
encode('win1251') ~115 Mb/s ~230 Mb/s | ||
decode('win1251') ~95 Mb/s ~130 Mb/s | ||
@@ -48,0 +48,0 @@ |
Sorry, the diff of this file is not supported yet
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
7
352846
1084