Comparing version 0.1.10 to 0.1.11
@@ -6,4 +6,5 @@ require('mootools'); | ||
require('./src/node/fs.js'); | ||
require('./src/node/http.js'); | ||
require('./src/zero_functions.js'); | ||
{ | ||
"name": "nyks", | ||
"version": "0.1.10", | ||
"version": "0.1.11", | ||
"description": "nodejs exupery style", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -17,2 +17,3 @@ nyks provide a set of "missing" stuffs in nodejs basic api. | ||
* require('fs').md5File(file_path, callback) | ||
* require('fs').md5FileSync(file_path) | ||
@@ -30,2 +31,5 @@ Return md5 checksum of a file | ||
## http | ||
* require('http').downloadFile(url, file_path, callback) | ||
Download a remote file | ||
@@ -71,2 +75,2 @@ | ||
* guid() | ||
Return a guid | ||
Return a guid |
@@ -75,3 +75,4 @@ | ||
String.implement({ | ||
Array.implement({ | ||
diff : function(a) { | ||
@@ -78,0 +79,0 @@ return this.filter(function(i) { return a.indexOf(i) < 0;} ); |
@@ -0,0 +0,0 @@ var cp = require('child_process'); |
@@ -13,2 +13,12 @@ | ||
fs.md5File = function (file_path, callback){ | ||
var shasum = crypto.createHash('md5'); | ||
var s = fs.ReadStream(file_path); | ||
s.on('data', shasum.update.bind(shasum)); | ||
s.on('end', function() { | ||
callback(null, shasum.digest('hex')); | ||
}); | ||
} | ||
fs.filesizeSync = function(file_path){ | ||
@@ -29,2 +39,6 @@ return fs.statSync(file_path)["size"]; | ||
fs.tmppath = function(ext){ | ||
@@ -31,0 +45,0 @@ ext = ext || "tmp"; |
@@ -0,0 +0,0 @@ var url = require('url'), |
@@ -0,0 +0,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7615
9
183
74
2