
Security News
CISA Kills Off RSS Feeds for KEVs and Cyber Alerts
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
did_it_work
Advanced tools
A simple process launcher that determines whether the process succeeded or failed.
Did it Work?: A simple process launcher that determines whether the process succeeded or failed.
npm install did_it_work
var process = require('did_it_work');
process('my_awesome_program')
.goodIfMatches(/Ready/, 1000)
.badIfMatches(/Error/)
.good(function(){
console.log('The program worked (because it spat out "Ready" to stdout within 1000ms).')
})
.bad(function(){
console.log('The program didn\'t work (because it spat out "Error" to stdout, or the program exited with non-zero code, or it didn\'t spit out "Ready" within 1000ms)')
})
.complete(function(){
console.log('In any case, the program exited')
})
spawn
instead of exec
If you pass one string argument to the function, it will use child_process.exec
to create the process. If, on the other hand, you need to use child_process.spawn
, pass two arguments instead, the first being the executable and the second being an array of arguments. Example
process('echo', ['hello', 'world'])
.complete(function(stdout){
console.log('The program returned ' + stdout)
})
To see more, read the tests in tests.js
.
FAQs
A simple process launcher that determines whether the process succeeded or failed.
The npm package did_it_work receives a total of 0 weekly downloads. As such, did_it_work popularity was classified as not popular.
We found that did_it_work demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISA is discontinuing official RSS support for KEV and cybersecurity alerts, shifting updates to email and social media, disrupting automation workflows.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.