timeout-then

2019-06-13 admin

timeout-then是什么

什么是timeout-then,setTimeout as promised

timeout-then使用教程帮助文档

timeout-then

NPM version Build status Test coverage Dependency Status License Downloads Gittip

setTimeout as a promise.

var timeout = require('timeout-then');

timeout(100).then(function () {
  console.log('blah');
});

// clear timeout
var timer = timeout(100);
timer.then(function () {
  console.log('blah');
});
timer.clear();

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处。

转载请注明:文章转载自 JavaScript中文网 [https://www.javascriptcn.com]

本文地址:https://www.javascriptcn.com/read-67224.html

文章标题:timeout-then

回到顶部