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

nyks

Package Overview
Dependencies
Maintainers
3
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 6.1.8 to 6.1.9

33

child_process/exec.js
"use strict";
const cp = require('child_process');
const once = require('../function/once');
const {spawn} = require('child_process');
const wait = require('./wait');
const drain = require('../stream/drain');
//callback(err, exit, lastline);
module.exports = function(cmd /*, options, chain*/) {
module.exports = async function(cmd, args = [], options = {}) {
if(!Array.isArray(args))
(options = args), (args = options.args || []);
var args = Array.from(arguments);
var chain = once(args.pop());
cmd = args.shift();
var options = args.shift() || {};
var child = spawn(cmd, args, options);
if(Array.isArray(options))
options = { args : options};
let [stdout] = await Promise.all([drain(child.stdout), wait(child)]);
var ps = cp.spawn(cmd, options.args || [], options);
var _stdout = "";
var _stderr = "";
ps.on('error', chain);
ps.stdout.on('data', function(data) { _stdout += data; });
ps.stderr.on('data', function(data) { _stderr += data; });
ps.on('close', function(exit) {
return chain(exit, _stdout, _stderr);
});
return ps;
return stdout;
};
{
"name": "nyks",
"version": "6.1.8",
"version": "6.1.9",
"description": "nodejs exupery style",

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

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