Gathering detailed insights and metrics for superspawn
Gathering detailed insights and metrics for superspawn
Gathering detailed insights and metrics for superspawn
Gathering detailed insights and metrics for superspawn
npm install superspawn
66.8
Supply Chain
89.1
Quality
74.8
Maintenance
100
Vulnerability
99.1
License
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
9 Stars
21 Commits
4 Forks
3 Watching
2 Branches
2 Contributors
Updated on 14 Jan 2018
Minified
Minified + Gzipped
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
-44.4%
25
Compared to previous day
Last week
-11.2%
333
Compared to previous week
Last month
-25%
1,629
Compared to previous month
Last year
59.2%
10,492
Compared to previous year
Original source from Apache Cordova's superspawn.js by Andrew Grieve. Requires Node.js 0.10+.
.exe
can be run. Supported: .exe, .cmd, .bat, .js, .vbs
See this Node bug.
1npm i --save superspawn
Superspawn uses the same signature as the native child_process.spawn. But instead of a reference to the child process it returns a Q.promise or undefined
if a callback is passed.
1var spawn = require('superspawn').spawn 2 3/** 4 * A windows-compatible spawn method. Succeeds for child exit code === 0. 5 * @param {string} cmd 6 * @param {string[]} [args] 7 * @param {opts} [opts] 8 * @param {function} [callback] - standard Node callback, omit if you want to use a promise. 9 * @returns {Q.promise|undefined} - returns a promise or undefined if a callback is passed. 10 * 11 * @typedef {Object} opts 12 * @property {boolean} [printCommand=false] - Whether to log the command 13 * @property {string} stdio - 14 * 'default' is to capture output and returning it as a string to success (same as exec). 15 * 'ignore' means don't bother capturing it. 16 * 'inherit' means pipe the input & output. This is required for anything that prompts. 17 * @property {object} env - Map of extra environment variables. 18 * @property {string} cwd - Working directory for the command. 19 */ 20spawn(cmd, args, opts, function(err, output) { 21 if (err) return err; 22}); 23 24// or 25 26spawn(cmd, args, opts) 27 .catch(function(err) {}) // rejectedHandler 28 .then(function(stdout) {}) // resolvedHandler 29;
1spawn('echo', ['buffalo'], function(err, output) { 2 if (err) return err; 3 assert.equal(output, 'buffalo'); 4}); 5 6spawn('./script.sh', 'inherit', function(err) { 7 if (err) return err; 8});
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
no SAST tool detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/21 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More