max-timeout.js 217 B

12345678910111213
  1. "use strict";
  2. module.exports = function (t, a, d) {
  3. var invoked, id;
  4. id = setTimeout(function () {
  5. invoked = true;
  6. }, t);
  7. setTimeout(function () {
  8. a(invoked, undefined);
  9. clearTimeout(id);
  10. d();
  11. }, 100);
  12. };