summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Early <alexander.early@gmail.com>2016-06-14 08:55:25 -0700
committerGitHub <noreply@github.com>2016-06-14 08:55:25 -0700
commit7162ba51761594db8c7dccbac1ad2ef7d99900bc (patch)
treecdd043df526f33ff1b4df49a52daad614de8f4d4
parent966e75c50385e693e13ab3feb12c9217daf2724b (diff)
parent1b7b4dae91938cd800c3aadfdb33fade417a03e0 (diff)
downloadasync-7162ba51761594db8c7dccbac1ad2ef7d99900bc.tar.gz
Merge pull request #1187 from searls/patch-1
Fix misspelling of "milliseconds"
-rw-r--r--lib/timeout.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/timeout.js b/lib/timeout.js
index 2186c1b..1ce5378 100644
--- a/lib/timeout.js
+++ b/lib/timeout.js
@@ -2,7 +2,7 @@ import initialParams from './internal/initialParams';
/**
* Sets a time limit on an asynchronous function. If the function does not call
- * its callback within the specified miliseconds, it will be called with a
+ * its callback within the specified milliseconds, it will be called with a
* timeout error. The code property for the error object will be `'ETIMEDOUT'`.
*
* @name timeout
@@ -11,7 +11,7 @@ import initialParams from './internal/initialParams';
* @category Util
* @param {Function} asyncFn - The asynchronous function you want to set the
* time limit.
- * @param {number} miliseconds - The specified time limit.
+ * @param {number} milliseconds - The specified time limit.
* @param {*} [info] - Any variable you want attached (`string`, `object`, etc)
* to timeout Error for more information..
* @returns {Function} Returns a wrapped function that can be used with any of
@@ -22,7 +22,7 @@ import initialParams from './internal/initialParams';
* doAsyncTask(callback);
* }, 1000);
*/
-export default function timeout(asyncFn, miliseconds, info) {
+export default function timeout(asyncFn, milliseconds, info) {
var originalCallback, timer;
var timedOut = false;
@@ -47,7 +47,7 @@ export default function timeout(asyncFn, miliseconds, info) {
return initialParams(function (args, origCallback) {
originalCallback = origCallback;
// setup timer and call original function
- timer = setTimeout(timeoutCallback, miliseconds);
+ timer = setTimeout(timeoutCallback, milliseconds);
asyncFn.apply(null, args.concat(injectedCallback));
});
}