
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
@fiusdevelopment/timed
Advanced tools
Have you ever heard of the command line program expect? Basically, expect
allows you to automate command line programs. suppose is a programmable
Node.js module that allows the same behavior.
From the expect wikipedia page, you can see many examples of expect
scripts automating tasks such as telnet or ftp sessions. Now you can easily
write Node.js scripts to do the same. This may be most beneficial during testing.
npm install suppose
Automate the command npm init, which initializes a new npm module.
var suppose = require('suppose')
, fs = require('fs')
, assert = require('assert')
process.chdir('/tmp/awesome');
fs.writeFileSync('/tmp/awesome/README.md', 'READ IT')
// debug is an optional writeable output stream
suppose('npm', ['init'], {debug: fs.createWriteStream('/tmp/debug.txt')})
.when(/name\: \([\w|\-]+\)[\s]*/).respond('awesome_package\n')
.when('version: (1.0.0) ').respond('0.0.1\n')
// response can also be the second argument to .when
.when('description: ', "It's an awesome package man!\n")
.when('entry point: (index.js) ').respond("\n")
.when('test command: ').respond('npm test\n')
.when('git repository: ').respond("\n")
.when('keywords: ').respond('awesome, cool\n')
.when('author: ').respond('JP Richardson\n')
.when('license: (ISC) ').respond('MIT\n')
.when('ok? (yes) ' ).respond('yes\n')
.on('error', function(err){
console.log(err.message);
})
.end(function(code){
var packageFile = '/tmp/awesome/package.json';
fs.readFile(packageFile, function(err, data){
var packageObj = JSON.parse(data.toString());
console.log(packageObj.name); //'awesome_package'
})
})
.respond() may be called any number of times after .when(). Each response
will be sent in the order defined when the condition matches. Once all
conditions and responses are defined, call .end() to begin execution.
(MIT License)
Copyright 2012-2013, JP Richardson
FAQs
Automate command line programs. Like UNIX expect.
We found that @fiusdevelopment/timed 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
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.