update, text, response
This commit is contained in:
14
node_modules/timers-ext/.editorconfig
generated
vendored
14
node_modules/timers-ext/.editorconfig
generated
vendored
@@ -1,14 +0,0 @@
|
||||
# EditorConfig is awesome: http://EditorConfig.org
|
||||
|
||||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
# Unix-style newlines with a newline ending every file
|
||||
[*]
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
indent_style = tab
|
||||
|
||||
[{*.json,*.yml}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
35
node_modules/timers-ext/CHANGELOG.md
generated
vendored
35
node_modules/timers-ext/CHANGELOG.md
generated
vendored
@@ -1,46 +1,45 @@
|
||||
# Change Log
|
||||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
||||
|
||||
### [0.1.8](https://github.com/medikoo/timers-ext/compare/v0.1.7...v0.1.8) (2024-06-03)
|
||||
|
||||
### Maintenance Improvements
|
||||
|
||||
- Bump dependencies ([1644a83](https://github.com/medikoo/timers-ext/commit/1644a83a63dbcb239140d0574014438cf58dddca))
|
||||
- Declare minimum Node.js version ([2cb991d](https://github.com/medikoo/timers-ext/commit/2cb991d1b7a835a4a332d1d77932ad39dc54e487))
|
||||
|
||||
<a name="0.1.7"></a>
|
||||
|
||||
## [0.1.7](https://github.com/medikoo/timers-ext/compare/v0.1.6...v0.1.7) (2018-10-04)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* typo in error message ([36720cf](https://github.com/medikoo/timers-ext/commit/36720cf))
|
||||
|
||||
|
||||
- typo in error message ([36720cf](https://github.com/medikoo/timers-ext/commit/36720cf))
|
||||
|
||||
<a name="0.1.6"></a>
|
||||
|
||||
## [0.1.6](https://github.com/medikoo/timers-ext/compare/v0.1.5...v0.1.6) (2018-10-04)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* report timeout value on error ([abb4afa](https://github.com/medikoo/timers-ext/commit/abb4afa))
|
||||
|
||||
|
||||
- report timeout value on error ([abb4afa](https://github.com/medikoo/timers-ext/commit/abb4afa))
|
||||
|
||||
<a name="0.1.5"></a>
|
||||
## [0.1.5](https://github.com/medikoo/timers-ext/compare/v0.1.4...v0.1.5) (2018-03-13)
|
||||
|
||||
## [0.1.5](https://github.com/medikoo/timers-ext/compare/v0.1.4...v0.1.5) (2018-03-13)
|
||||
|
||||
### Features
|
||||
|
||||
* **promise:** sleep util ([c50d575](https://github.com/medikoo/timers-ext/commit/c50d575))
|
||||
|
||||
|
||||
- **promise:** sleep util ([c50d575](https://github.com/medikoo/timers-ext/commit/c50d575))
|
||||
|
||||
<a name="0.1.4"></a>
|
||||
## [0.1.4](https://github.com/medikoo/timers-ext/compare/v0.1.3...v0.1.4) (2018-03-08)
|
||||
|
||||
## [0.1.4](https://github.com/medikoo/timers-ext/compare/v0.1.3...v0.1.4) (2018-03-08)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **promise:** clear timeout on promise resolution ([6301a6b](https://github.com/medikoo/timers-ext/commit/6301a6b))
|
||||
|
||||
|
||||
- **promise:** clear timeout on promise resolution ([6301a6b](https://github.com/medikoo/timers-ext/commit/6301a6b))
|
||||
|
||||
<a name="0.1.3"></a>
|
||||
|
||||
@@ -48,7 +47,7 @@ All notable changes to this project will be documented in this file. See [standa
|
||||
|
||||
### Features
|
||||
|
||||
* **promise:** promise.timeout method ([3f52d27](https://github.com/medikoo/timers-ext/commit/3f52d27))
|
||||
- **promise:** promise.timeout method ([3f52d27](https://github.com/medikoo/timers-ext/commit/3f52d27))
|
||||
|
||||
## Changelog for previous versions
|
||||
|
||||
|
||||
2
node_modules/timers-ext/LICENSE
generated
vendored
2
node_modules/timers-ext/LICENSE
generated
vendored
@@ -1,6 +1,6 @@
|
||||
ISC License
|
||||
|
||||
Copyright (c) 2013-2018, Mariusz Nowak, @medikoo, medikoo.com
|
||||
Copyright (c) 2013-2024, Mariusz Nowak, @medikoo, medikoo.com
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
|
||||
36
node_modules/timers-ext/README.md
generated
vendored
36
node_modules/timers-ext/README.md
generated
vendored
@@ -1,6 +1,5 @@
|
||||
[![Build status][nix-build-image]][nix-build-url]
|
||||
[![Windows status][win-build-image]][win-build-url]
|
||||
![Transpilation status][transpilation-image]
|
||||
[![Build status][build-image]][build-url]
|
||||
[![Tests coverage][cov-image]][cov-url]
|
||||
[![npm version][npm-image]][npm-url]
|
||||
|
||||
# timers-ext
|
||||
@@ -30,19 +29,17 @@ Makes sure to execute _fn_ function only once after a defined interval of time (
|
||||
|
||||
```javascript
|
||||
var nextTick = require("next-tick");
|
||||
var logFoo = function() {
|
||||
console.log("foo");
|
||||
};
|
||||
var logFoo = function () { console.log("foo"); };
|
||||
var logFooOnce = require("timers-ext/once")(logFoo);
|
||||
|
||||
logFooOnce();
|
||||
logFooOnce(); // ignored, logFoo will be logged only once
|
||||
logFooOnce(); // ignored
|
||||
|
||||
nextTick(function() {
|
||||
logFooOnce(); // Invokes another log (as tick passed)
|
||||
logFooOnce(); // ignored
|
||||
logFooOnce(); // ignored
|
||||
nextTick(function () {
|
||||
logFooOnce(); // Invokes another log (as tick passed)
|
||||
logFooOnce(); // ignored
|
||||
logFooOnce(); // ignored
|
||||
});
|
||||
```
|
||||
|
||||
@@ -52,18 +49,21 @@ Validates timeout value.
|
||||
For `NaN` resolved _timeout_ `0` is returned.
|
||||
If _timeout_ resolves to a number:
|
||||
|
||||
- for _timeout < 0_ `0` is returned
|
||||
- for _0 >= timeout <= [MAX_TIMEOUT](#max_timeout-timers-extmax-timeout)_, `timeout` value is returned
|
||||
- for _timeout > [MAX_TIMEOUT](#max_timeout-timers-extmax-timeout)_ exception is thrown
|
||||
- for _timeout < 0_ `0` is returned
|
||||
- for _0 >= timeout <= [MAX_TIMEOUT](#max_timeout-timers-extmax-timeout)_, `timeout` value is returned
|
||||
- for _timeout > [MAX_TIMEOUT](#max_timeout-timers-extmax-timeout)_ exception is thrown
|
||||
|
||||
### Tests
|
||||
|
||||
$ npm test
|
||||
|
||||
[nix-build-image]: https://semaphoreci.com/api/v1/medikoo-org/timers-ext/branches/master/shields_badge.svg
|
||||
[nix-build-url]: https://semaphoreci.com/medikoo-org/timers-ext
|
||||
[win-build-image]: https://ci.appveyor.com/api/projects/status/2i5nerowov2ho3o9?svg=true
|
||||
[win-build-url]: https://ci.appveyor.com/project/medikoo/timers-ext
|
||||
[transpilation-image]: https://img.shields.io/badge/transpilation-free-brightgreen.svg
|
||||
## Security contact information
|
||||
|
||||
To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure.
|
||||
|
||||
[build-image]: https://github.com/medikoo/timers-ext/workflows/Integrate/badge.svg
|
||||
[build-url]: https://github.com/medikoo/timers-ext/actions?query=workflow%3AIntegrate
|
||||
[cov-image]: https://img.shields.io/codecov/c/github/medikoo/timers-ext.svg
|
||||
[cov-url]: https://codecov.io/gh/medikoo/timers-ext
|
||||
[npm-image]: https://img.shields.io/npm/v/timers-ext.svg
|
||||
[npm-url]: https://www.npmjs.com/package/timers-ext
|
||||
|
||||
4
node_modules/timers-ext/delay.js
generated
vendored
4
node_modules/timers-ext/delay.js
generated
vendored
@@ -15,7 +15,5 @@ module.exports = function (fn/*, timeout*/) {
|
||||
timeout = validTimeout(timeout);
|
||||
delay = setTimeout;
|
||||
}
|
||||
return function () {
|
||||
return delay(apply.bind(fn, this, arguments), timeout);
|
||||
};
|
||||
return function () { return delay(apply.bind(fn, this, arguments), timeout); };
|
||||
};
|
||||
|
||||
168
node_modules/timers-ext/package.json
generated
vendored
168
node_modules/timers-ext/package.json
generated
vendored
@@ -1,75 +1,97 @@
|
||||
{
|
||||
"_from": "timers-ext@^0.1.7",
|
||||
"_id": "timers-ext@0.1.7",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==",
|
||||
"_location": "/timers-ext",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "timers-ext@^0.1.7",
|
||||
"name": "timers-ext",
|
||||
"escapedName": "timers-ext",
|
||||
"rawSpec": "^0.1.7",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^0.1.7"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/memoizee"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.7.tgz",
|
||||
"_shasum": "6f57ad8578e07a3fb9f91d9387d65647555e25c6",
|
||||
"_spec": "timers-ext@^0.1.7",
|
||||
"_where": "/var/www/html/jason/WeihnachtenMelly/node_modules/memoizee",
|
||||
"author": {
|
||||
"name": "Mariusz Nowak",
|
||||
"email": "medyk@medikoo.com",
|
||||
"url": "http://www.medikoo.com/"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/medikoo/timers-ext/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"es5-ext": "~0.10.46",
|
||||
"next-tick": "1"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Timers extensions",
|
||||
"devDependencies": {
|
||||
"eslint": "^5.6.1",
|
||||
"eslint-config-medikoo-es5": "^1.7.2",
|
||||
"tad": "^0.2.8"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "medikoo-es5",
|
||||
"root": true,
|
||||
"globals": {
|
||||
"clearInterval": true,
|
||||
"clearTimeout": true,
|
||||
"setInterval": true,
|
||||
"setTimeout": true
|
||||
}
|
||||
},
|
||||
"homepage": "https://github.com/medikoo/timers-ext#readme",
|
||||
"keywords": [
|
||||
"timeout",
|
||||
"delay",
|
||||
"interval",
|
||||
"time",
|
||||
"timer",
|
||||
"timers"
|
||||
],
|
||||
"license": "ISC",
|
||||
"name": "timers-ext",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/medikoo/timers-ext.git"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint --ignore-path=.gitignore .",
|
||||
"test": "node node_modules/tad/bin/tad"
|
||||
},
|
||||
"version": "0.1.7"
|
||||
"name": "timers-ext",
|
||||
"version": "0.1.8",
|
||||
"description": "Timers extensions",
|
||||
"author": "Mariusz Nowak <medyk@medikoo.com> (http://www.medikoo.com/)",
|
||||
"repository": "medikoo/timers-ext",
|
||||
"keywords": [
|
||||
"timeout",
|
||||
"delay",
|
||||
"interval",
|
||||
"time",
|
||||
"timer",
|
||||
"timers"
|
||||
],
|
||||
"dependencies": {
|
||||
"es5-ext": "^0.10.64",
|
||||
"next-tick": "^1.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-config-medikoo": "^4.2.0",
|
||||
"git-list-updated": "^1.2.1",
|
||||
"github-release-from-cc-changelog": "^2.3.0",
|
||||
"husky": "^4.3.8",
|
||||
"lint-staged": "^15.2.5",
|
||||
"nyc": "^15.1.0",
|
||||
"prettier-elastic": "^3.2.5",
|
||||
"tad": "^3.1.1"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "lint-staged"
|
||||
}
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.js": [
|
||||
"eslint"
|
||||
],
|
||||
"*.{css,html,js,json,md,yaml,yml}": [
|
||||
"prettier -c"
|
||||
]
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "medikoo/es5",
|
||||
"root": true,
|
||||
"globals": {
|
||||
"clearInterval": true,
|
||||
"clearTimeout": true,
|
||||
"setInterval": true,
|
||||
"setTimeout": true
|
||||
}
|
||||
},
|
||||
"prettier": {
|
||||
"printWidth": 100,
|
||||
"tabWidth": 4,
|
||||
"trailingComma": "none",
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"*.md",
|
||||
"*.yml"
|
||||
],
|
||||
"options": {
|
||||
"tabWidth": 2
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"nyc": {
|
||||
"all": true,
|
||||
"exclude": [
|
||||
".github",
|
||||
"coverage/**",
|
||||
"test/**",
|
||||
"*.config.js"
|
||||
],
|
||||
"reporter": [
|
||||
"lcov",
|
||||
"html",
|
||||
"text-summary"
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
"coverage": "nyc npm test",
|
||||
"lint": "eslint --ignore-path=.gitignore .",
|
||||
"lint:updated": "pipe-git-updated --base=main --ext=js -- eslint --ignore-pattern '!*'",
|
||||
"prettier-check": "prettier -c --ignore-path .gitignore \"**/*.{css,html,js,json,md,yaml,yml}\"",
|
||||
"prettier-check:updated": "pipe-git-updated --base=main --ext=css --ext=html --ext=js --ext=json --ext=md --ext=yaml --ext=yml -- prettier -c",
|
||||
"prettify": "prettier --write --ignore-path .gitignore \"**/*.{css,html,js,json,md,yaml,yml}\"",
|
||||
"prettify:updated": "pipe-git-updated ---base=main -ext=css --ext=html --ext=js --ext=json --ext=md --ext=yaml --ext=yml -- prettier --write",
|
||||
"test": "tad"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.12"
|
||||
},
|
||||
"license": "ISC"
|
||||
}
|
||||
|
||||
4
node_modules/timers-ext/promise/.eslintrc.json
generated
vendored
4
node_modules/timers-ext/promise/.eslintrc.json
generated
vendored
@@ -1,3 +1 @@
|
||||
{
|
||||
"globals": { "Promise": true }
|
||||
}
|
||||
{ "globals": { "Promise": true } }
|
||||
|
||||
4
node_modules/timers-ext/promise/sleep.js
generated
vendored
4
node_modules/timers-ext/promise/sleep.js
generated
vendored
@@ -11,9 +11,7 @@ module.exports = function (/* timeout */) {
|
||||
if (isValue(timeout)) timeout = ensureTimeout(timeout);
|
||||
return new Constructor(function (resolve) {
|
||||
if (isValue(timeout)) {
|
||||
setTimeout(function () {
|
||||
resolve();
|
||||
}, timeout);
|
||||
setTimeout(function () { resolve(); }, timeout);
|
||||
} else {
|
||||
nextTick(resolve);
|
||||
}
|
||||
|
||||
3
node_modules/timers-ext/promise_/timeout.js
generated
vendored
3
node_modules/timers-ext/promise_/timeout.js
generated
vendored
@@ -31,8 +31,7 @@ module.exports = function (/* timeout */) {
|
||||
isSettled = true;
|
||||
clearTimeout(timeoutId);
|
||||
resolve(value);
|
||||
},
|
||||
function (reason) {
|
||||
}, function (reason) {
|
||||
isSettled = true;
|
||||
clearTimeout(timeoutId);
|
||||
reject(reason);
|
||||
|
||||
6
node_modules/timers-ext/test/.eslintrc.json
generated
vendored
6
node_modules/timers-ext/test/.eslintrc.json
generated
vendored
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"rules": {
|
||||
"id-length": "off",
|
||||
"no-shadow": "off"
|
||||
}
|
||||
}
|
||||
27
node_modules/timers-ext/test/delay.js
generated
vendored
27
node_modules/timers-ext/test/delay.js
generated
vendored
@@ -1,27 +0,0 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = function (t, a, d) {
|
||||
var data
|
||||
, count = 0
|
||||
, x = function (a, b, c) {
|
||||
data = [this, a, b, c, ++count];
|
||||
}
|
||||
, y = t(x, 200)
|
||||
, z = {};
|
||||
|
||||
a(data, undefined, "Setup");
|
||||
y.call(z, 111, "foo", false);
|
||||
a(data, undefined, "Immediately");
|
||||
setTimeout(function () {
|
||||
a(data, undefined, "100ms");
|
||||
setTimeout(function () {
|
||||
a.deep(data, [z, 111, "foo", false, 1], "250ms");
|
||||
data = null;
|
||||
clearTimeout(y());
|
||||
setTimeout(function () {
|
||||
a(data, null, "Clear");
|
||||
d();
|
||||
}, 300);
|
||||
}, 150);
|
||||
}, 100);
|
||||
};
|
||||
13
node_modules/timers-ext/test/max-timeout.js
generated
vendored
13
node_modules/timers-ext/test/max-timeout.js
generated
vendored
@@ -1,13 +0,0 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = function (t, a, d) {
|
||||
var invoked, id;
|
||||
id = setTimeout(function () {
|
||||
invoked = true;
|
||||
}, t);
|
||||
setTimeout(function () {
|
||||
a(invoked, undefined);
|
||||
clearTimeout(id);
|
||||
d();
|
||||
}, 100);
|
||||
};
|
||||
42
node_modules/timers-ext/test/once.js
generated
vendored
42
node_modules/timers-ext/test/once.js
generated
vendored
@@ -1,42 +0,0 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = function (t, a, d) {
|
||||
var called = 0, fn = t(function () {
|
||||
++called;
|
||||
});
|
||||
|
||||
fn();
|
||||
fn();
|
||||
fn();
|
||||
setTimeout(function () {
|
||||
a(called, 1);
|
||||
|
||||
called = 0;
|
||||
fn = t(function () {
|
||||
++called;
|
||||
}, 50);
|
||||
fn();
|
||||
fn();
|
||||
fn();
|
||||
|
||||
setTimeout(function () {
|
||||
fn();
|
||||
fn();
|
||||
|
||||
setTimeout(function () {
|
||||
fn();
|
||||
fn();
|
||||
|
||||
setTimeout(function () {
|
||||
fn();
|
||||
fn();
|
||||
|
||||
setTimeout(function () {
|
||||
a(called, 1);
|
||||
d();
|
||||
}, 70);
|
||||
}, 30);
|
||||
}, 30);
|
||||
}, 30);
|
||||
}, 10);
|
||||
};
|
||||
34
node_modules/timers-ext/test/promise/sleep.js
generated
vendored
34
node_modules/timers-ext/test/promise/sleep.js
generated
vendored
@@ -1,34 +0,0 @@
|
||||
"use strict";
|
||||
|
||||
var delay = require("../../delay");
|
||||
|
||||
module.exports = function (t, a) {
|
||||
if (typeof Promise !== "function") return null;
|
||||
return {
|
||||
Tick: function (d) {
|
||||
var isInvoked = false;
|
||||
t().then(function (result) {
|
||||
isInvoked = true;
|
||||
delay(function () {
|
||||
a(result, undefined);
|
||||
d();
|
||||
})();
|
||||
}, delay(d));
|
||||
a(isInvoked, false);
|
||||
},
|
||||
Timeout: function (d) {
|
||||
var isInvoked = false;
|
||||
t(100).then(
|
||||
delay(function (result) {
|
||||
isInvoked = true;
|
||||
a(result, undefined);
|
||||
d();
|
||||
}),
|
||||
delay(d)
|
||||
);
|
||||
setTimeout(function () {
|
||||
a(isInvoked, false);
|
||||
}, 50);
|
||||
}
|
||||
};
|
||||
};
|
||||
3
node_modules/timers-ext/test/promise_/.eslintrc.json
generated
vendored
3
node_modules/timers-ext/test/promise_/.eslintrc.json
generated
vendored
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"globals": { "Promise": true }
|
||||
}
|
||||
46
node_modules/timers-ext/test/promise_/timeout.js
generated
vendored
46
node_modules/timers-ext/test/promise_/timeout.js
generated
vendored
@@ -1,46 +0,0 @@
|
||||
"use strict";
|
||||
|
||||
var delay = require("../../delay");
|
||||
|
||||
module.exports = function (t, a) {
|
||||
if (typeof Promise !== "function") return null;
|
||||
return {
|
||||
Success: function (d) {
|
||||
var promise = t.call(
|
||||
new Promise(function (resolve) {
|
||||
setTimeout(function () { resolve("foo"); }, 20);
|
||||
}),
|
||||
40
|
||||
);
|
||||
|
||||
promise.then(
|
||||
// Delay to escape error swallowing
|
||||
delay(function (result) {
|
||||
a(result, "foo");
|
||||
d();
|
||||
}),
|
||||
delay(d)
|
||||
);
|
||||
},
|
||||
Timeout: function (d) {
|
||||
var promise = t.call(
|
||||
new Promise(function (resolve) {
|
||||
setTimeout(function () { resolve("foo"); }, 40);
|
||||
}),
|
||||
20
|
||||
);
|
||||
|
||||
promise.then(
|
||||
// Delay to escape error swallowing
|
||||
delay(function () {
|
||||
a.never();
|
||||
d();
|
||||
}),
|
||||
delay(function (err) {
|
||||
a(err.code, "PROMISE_TIMEOUT");
|
||||
d();
|
||||
})
|
||||
);
|
||||
}
|
||||
};
|
||||
};
|
||||
41
node_modules/timers-ext/test/throttle.js
generated
vendored
41
node_modules/timers-ext/test/throttle.js
generated
vendored
@@ -1,41 +0,0 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = function (t, a, d) {
|
||||
var called = 0;
|
||||
var fn = t(function () {
|
||||
++called;
|
||||
}, 200);
|
||||
|
||||
fn();
|
||||
a(called, 1);
|
||||
fn();
|
||||
fn();
|
||||
a(called, 1);
|
||||
// Wait 120ms
|
||||
setTimeout(function () {
|
||||
a(called, 1);
|
||||
fn();
|
||||
// Wait 120ms
|
||||
setTimeout(function () {
|
||||
a(called, 2);
|
||||
fn();
|
||||
fn();
|
||||
|
||||
// Wait 80ms
|
||||
setTimeout(function () {
|
||||
a(called, 2);
|
||||
|
||||
// Wait 120ms
|
||||
setTimeout(function () {
|
||||
a(called, 3);
|
||||
|
||||
// Wait 400ms
|
||||
setTimeout(function () {
|
||||
a(called, 3);
|
||||
d();
|
||||
}, 400);
|
||||
}, 120);
|
||||
}, 80);
|
||||
}, 120);
|
||||
}, 120);
|
||||
};
|
||||
10
node_modules/timers-ext/test/valid-timeout.js
generated
vendored
10
node_modules/timers-ext/test/valid-timeout.js
generated
vendored
@@ -1,10 +0,0 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = function (t, a) {
|
||||
a(t(NaN), 0, "NaN");
|
||||
a(t(-343), 0, "Negative");
|
||||
a(t(232342), 232342, "Positive");
|
||||
a.throws(function () {
|
||||
t(1e23);
|
||||
}, TypeError, "Too large");
|
||||
};
|
||||
3
node_modules/timers-ext/throttle.js
generated
vendored
3
node_modules/timers-ext/throttle.js
generated
vendored
@@ -2,8 +2,7 @@
|
||||
|
||||
var callable = require("es5-ext/object/valid-callable")
|
||||
, validTimeout = require("./valid-timeout")
|
||||
|
||||
, apply = Function.prototype.apply;
|
||||
, apply = Function.prototype.apply;
|
||||
|
||||
module.exports = function (fn, timeout) {
|
||||
var isScheduled = false, context, args, run;
|
||||
|
||||
Reference in New Issue
Block a user