mirror of
https://github.com/Raghu-Ch/nodeRestAPI.git
synced 2026-02-11 13:13:02 -05:00
initial commit
This commit is contained in:
18
node_modules/flagged-respawn/index.js
generated
vendored
Normal file
18
node_modules/flagged-respawn/index.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
const reorder = require('./lib/reorder');
|
||||
const respawn = require('./lib/respawn');
|
||||
|
||||
module.exports = function (flags, argv, execute) {
|
||||
if (!flags) {
|
||||
throw new Error('You must specify flags to respawn with.');
|
||||
}
|
||||
if (!argv) {
|
||||
throw new Error('You must specify an argv array.');
|
||||
}
|
||||
var proc = process;
|
||||
var reordered = reorder(flags, argv);
|
||||
var ready = JSON.stringify(argv) === JSON.stringify(reordered);
|
||||
if (!ready) {
|
||||
proc = respawn(reordered);
|
||||
}
|
||||
execute(ready, proc);
|
||||
};
|
||||
Reference in New Issue
Block a user