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

nyks

Package Overview
Dependencies
Maintainers
1
Versions
250
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nyks - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

src/node/path.js

1

index.js

@@ -8,2 +8,3 @@ require('mootools');

require('./src/node/fs.js');
require('./src/node/path.js');
require('./src/node/http.js');

@@ -10,0 +11,0 @@ require('./src/zero_functions.js');

2

package.json
{
"name": "nyks",
"version": "0.3.0",
"version": "0.4.0",
"description": "nodejs exupery style",

@@ -5,0 +5,0 @@ "keywords": [

@@ -9,9 +9,13 @@ nyks provide a set of "missing" stuffs in nodejs basic api.

* require('child_process').exec_window(cmd, args, callback);
child_process.exec equivalent for windowed applications.
## Date
* Date.now()
Return current unix timestamp, in seconds, as float
* require('child_process').passthru(cmd, args, callback);
* require('child_process').passthru(cmd, {args:args,env:env}, callback);
callback(err, exit_code, last_stdout_line);
## path
* path.which
Return full path of a binary in env PATH
## fs

@@ -18,0 +22,0 @@ * require('fs').deleteFolderRecursive(path);

@@ -9,1 +9,32 @@ var cp = require('child_process');

}
//callback(err, exit, lastline);
cp.passthru = function(cmd, options, chain){
if(Array.isArray(options))
options = { args : options} ;
options = options || {};
var ps = cp.spawn(cmd, options.args || [], options),
_ret = "";
ps.on('error', function(err){
ps.removeAllListeners('close');
ps.on('close', function(exit) {
return chain(err, exit);
});
});
ps.stdout.on("data", function(data){
_ret = data.toString();
console.log(data.toString());
});
ps.stderr.on("data", function(data){
console.err(data.toString())
});
ps.on('close', function(exit) {
return chain(null, exit, _ret);
});
}
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