New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

echolist-csv2hpt

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

echolist-csv2hpt - npm Package Compare versions

Comparing version

to
1.0.1

28

api.js
var fs = require('fs');
var path = require('path');
var iconv = require('iconv-lite');
require('array.prototype.find');
require('iconv-lite').extendNodeEncodings();
var clog = console.log;

@@ -12,3 +10,3 @@

try {
return fs.readFileSync(filename, {encoding: encoding});
return iconv.decode( fs.readFileSync(filename), encoding );
} catch(err) {

@@ -28,3 +26,3 @@ clog('');

try {
fs.writeFileSync(filename, content, {encoding: encoding});
fs.writeFileSync(filename, iconv.encode(content, encoding));
} catch(err) {

@@ -44,16 +42,14 @@ clog('');

return contentCSV.map(function(fileCSV){
var foundElement = fileCSV.find(function(elementCSV){
return elementCSV.lcEchotag === lcEchotag;
});
var foundElement = fileCSV.find(
elementCSV => elementCSV.lcEchotag === lcEchotag
);
if( typeof foundElement === 'undefined' ) return null;
return foundElement;
}).filter(function(nextElement){
return nextElement !== null;
})[0];
}).filter( nextElement => nextElement !== null )[0];
};
module.exports = function(filenamesCSV, filenameHPT, options){
filenamesCSV = filenamesCSV.map(function(nextFilename){
return path.resolve(__dirname, nextFilename);
});
filenamesCSV = filenamesCSV.map(
nextFilename => path.resolve(__dirname, nextFilename)
);
filenameHPT = path.resolve(__dirname, filenameHPT);

@@ -90,5 +86,3 @@

};
}).filter(function(nextLine){
return nextLine !== null;
});
}).filter( nextLine => nextLine !== null );
});

@@ -95,0 +89,0 @@

@@ -6,3 +6,3 @@ {

"preferGlobal": true,
"version": "0.2.1",
"version": "1.0.1",
"description": "Copies Fidonet echomail area descriptions from a CSV echolist to an HPT areas file.",

@@ -17,4 +17,3 @@ "keywords": ["Fidonet", "echomail", "echolist", "HPT", "area", "areas", "echoes"],

"dependencies": {
"array.prototype.find": "~1.0.0",
"iconv-lite": "0.4.11"
"iconv-lite": "~0.4.13"
},

@@ -21,0 +20,0 @@ "scripts": {

@@ -6,2 +6,4 @@ [![(a histogram of downloads)](https://nodei.co/npm-dl/echolist-csv2hpt.png?height=3)](https://npmjs.org/package/echolist-csv2hpt)

It requires [Node.js](http://nodejs.org/) to run and [npm](https://www.npmjs.org/) to be installed.
* Starting from v1.0.0, this module requires Node.js version 4.0.0 or newer.
* You may run older versions of this module in Node.js version 0.10.x or 0.12.x. These older versions, however, had to contain an additional dependency ([`array.prototype.find`](https://www.npmjs.com/package/array.prototype.find)) as a polyfill for a missing [ECMAScript 2015 (ES6) feature](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find) which is now a part of Node.js.

@@ -8,0 +10,0 @@ ## Installing echolist-csv2hpt

Sorry, the diff of this file is not supported yet