timeout-then
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

timeout-then

NPM version Build status Test coverage Dependency Status License Downloads

setTimeout as a promise.

const timeout = require('timeout-then');
 
timeout(100).then(function () {
  console.log('blah');
});
 
// clear timeout
let timer = timeout(100);
timer.then(function () {
  console.log('blah');
});
timer.clear();

Package Sidebar

Install

npm i timeout-then

Weekly Downloads

561

Version

2.0.0

License

MIT

Unpacked Size

3.78 kB

Total Files

5

Last publish

Collaborators

  • coderhaoxin
  • jongleberry