Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

enamdict

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

enamdict - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

33

download-enamdict.js
/**
* Utility for downloading the latest ENAMDICT, converting it to the right
* encoding, re-formatting it, and saving as a compressed file.
* encoding, re-formatting it, and outputting it to STDOUT.
*/

@@ -15,11 +15,2 @@ var enamdict = require("./enamdict");

try {
fs.statSync(enamdict.enamdictFile);
process.exit(0);
} catch(e) {
// If it doesn't exist then we need to download the dict
}
console.log("Downloading ENAMDICT...");
// Download the ENMADICT database

@@ -34,26 +25,6 @@ var stream = request(enamdictURL)

enamdict.init(stream, function() {
console.log("Processing...");
// And then convert it to the desired file format
enamdict.process(function(err, data) {
console.log("Outputting...");
// Write out the result to a file!
// Stick the string into the stream.
var stream = new Stream();
stream.pipe = function(dest) {
dest.write(data);
return dest;
};
stream
// Make sure it's gzipped
.pipe(zlib.createGzip())
// Write it out to a file
.pipe(fs.createWriteStream(enamdict.enamdictFile))
.on("end", function() {
console.log("DONE");
});
return console.log(data);
});
});

10

package.json
{
"name": "enamdict",
"version": "0.1.4",
"version": "0.1.5",
"description": "Efficiently query ENAMDICT using Node.js.",

@@ -8,3 +8,3 @@ "main": "enamdict.js",

"test": "echo \"Error: no test specified\" && exit 1",
"install": "node download-enamdict.js"
"update": "node download-enamdict.js | gzip > enamdict.gz"
},

@@ -28,6 +28,6 @@ "repository": {

"dependencies": {
"concat-stream": "~1.5.2",
"iconv": "^2.1.11",
"request": "~2.75.0"
"concat-stream": "1.5.2",
"iconv": "2.2.1",
"request": "2.78.0"
}
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc