Skip to content

thenables/timeout-then

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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();