summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/apply.js3
-rw-r--r--lib/applyEach.js3
-rw-r--r--lib/applyEachSeries.js3
-rw-r--r--lib/asyncify.js3
-rw-r--r--lib/auto.js3
-rw-r--r--lib/autoInject.js3
-rw-r--r--lib/cargo.js3
-rw-r--r--lib/compose.js3
-rw-r--r--lib/concat.js3
-rw-r--r--lib/concatSeries.js3
-rw-r--r--lib/constant.js3
-rw-r--r--lib/detect.js3
-rw-r--r--lib/detectLimit.js3
-rw-r--r--lib/detectSeries.js3
-rw-r--r--lib/dir.js3
-rw-r--r--lib/doDuring.js3
-rw-r--r--lib/doUntil.js3
-rw-r--r--lib/doWhilst.js3
-rw-r--r--lib/during.js3
-rw-r--r--lib/each.js3
-rw-r--r--lib/eachLimit.js3
-rw-r--r--lib/eachOf.js3
-rw-r--r--lib/eachOfLimit.js3
-rw-r--r--lib/eachOfSeries.js3
-rw-r--r--lib/eachSeries.js3
-rw-r--r--lib/ensureAsync.js3
-rw-r--r--lib/every.js3
-rw-r--r--lib/everyLimit.js3
-rw-r--r--lib/everySeries.js3
-rw-r--r--lib/filter.js3
-rw-r--r--lib/filterLimit.js3
-rw-r--r--lib/filterSeries.js3
-rw-r--r--lib/forever.js3
-rw-r--r--lib/iterator.js3
-rw-r--r--lib/log.js3
-rw-r--r--lib/map.js3
-rw-r--r--lib/mapLimit.js3
-rw-r--r--lib/mapSeries.js3
-rw-r--r--lib/mapValues.js3
-rw-r--r--lib/mapValuesLimit.js3
-rw-r--r--lib/mapValuesSeries.js3
-rw-r--r--lib/memoize.js3
-rw-r--r--lib/nextTick.js3
-rw-r--r--lib/parallel.js3
-rw-r--r--lib/parallelLimit.js3
-rw-r--r--lib/priorityQueue.js3
-rw-r--r--lib/queue.js3
-rw-r--r--lib/race.js3
-rw-r--r--lib/reduce.js3
-rw-r--r--lib/reduceRight.js3
-rw-r--r--lib/reflect.js3
-rw-r--r--lib/reflectAll.js3
-rw-r--r--lib/reject.js3
-rw-r--r--lib/rejectLimit.js3
-rw-r--r--lib/rejectSeries.js3
-rw-r--r--lib/retry.js3
-rw-r--r--lib/retryable.js3
-rw-r--r--lib/seq.js3
-rw-r--r--lib/series.js3
-rw-r--r--lib/setImmediate.js3
-rw-r--r--lib/some.js3
-rw-r--r--lib/someLimit.js3
-rw-r--r--lib/someSeries.js3
-rw-r--r--lib/sortBy.js3
-rw-r--r--lib/timeout.js3
-rw-r--r--lib/times.js3
-rw-r--r--lib/timesLimit.js3
-rw-r--r--lib/timesSeries.js3
-rw-r--r--lib/transform.js3
-rw-r--r--lib/unmemoize.js3
-rw-r--r--lib/until.js3
-rw-r--r--lib/waterfall.js3
-rw-r--r--lib/whilst.js3
-rw-r--r--support/jsdoc-import-path-plugin.js21
-rw-r--r--support/jsdoc.json2
75 files changed, 22 insertions, 220 deletions
diff --git a/lib/apply.js b/lib/apply.js
index 8c43e34..465ed10 100644
--- a/lib/apply.js
+++ b/lib/apply.js
@@ -1,9 +1,6 @@
import rest from 'lodash/rest';
/**
- * ```
- * import apply from 'async/apply'
- * ```
* Creates a continuation function with some arguments already applied.
*
* Useful as a shorthand when combined with other control flow functions. Any
diff --git a/lib/applyEach.js b/lib/applyEach.js
index 656014c..c106114 100644
--- a/lib/applyEach.js
+++ b/lib/applyEach.js
@@ -2,9 +2,6 @@ import applyEach from './internal/applyEach';
import map from './map';
/**
- * ```
- * import applyEach from 'async/applyEach'
- * ```
* Applies the provided arguments to each function in the array, calling
* `callback` after all functions have completed. If you only provide the first
* argument, then it will return a function which lets you pass in the
diff --git a/lib/applyEachSeries.js b/lib/applyEachSeries.js
index 892e355..f0919cb 100644
--- a/lib/applyEachSeries.js
+++ b/lib/applyEachSeries.js
@@ -2,9 +2,6 @@ import applyEach from './internal/applyEach';
import mapSeries from './mapSeries';
/**
- * ```
- * import applyEachSeries from 'async/applyEachSeries'
- * ```
* The same as [`applyEach`]{@link module:ControlFlow.applyEach} but runs only a single async operation at a time.
*
* @name applyEachSeries
diff --git a/lib/asyncify.js b/lib/asyncify.js
index 9baa238..e235311 100644
--- a/lib/asyncify.js
+++ b/lib/asyncify.js
@@ -2,9 +2,6 @@ import isObject from 'lodash/isObject';
import initialParams from './internal/initialParams';
/**
- * ```
- * import asyncify from 'async/asyncify'
- * ```
* Take a sync function and make it async, passing its return value to a
* callback. This is useful for plugging sync functions into a waterfall,
* series, or other async functions. Any arguments passed to the generated
diff --git a/lib/auto.js b/lib/auto.js
index c6f291c..ce9f259 100644
--- a/lib/auto.js
+++ b/lib/auto.js
@@ -10,9 +10,6 @@ import rest from 'lodash/rest';
import onlyOnce from './internal/onlyOnce';
/**
- * ```
- * import auto from 'async/auto'
- * ```
* Determines the best order for running the functions in `tasks`, based on
* their requirements. Each function can optionally depend on other functions
* being completed first, and each function is run as soon as its requirements
diff --git a/lib/autoInject.js b/lib/autoInject.js
index fc6399c..1b7bed4 100644
--- a/lib/autoInject.js
+++ b/lib/autoInject.js
@@ -12,9 +12,6 @@ function parseParams(func) {
}
/**
- * ```
- * import autoInject from 'async/autoInject'
- * ```
* A dependency-injected version of the [async.auto]{@link module:ControlFlow.auto} function. Dependent
* tasks are specified as parameters to the function, after the usual callback
* parameter, with the parameter names matching the names of the tasks it
diff --git a/lib/cargo.js b/lib/cargo.js
index 9bdc613..d86cb67 100644
--- a/lib/cargo.js
+++ b/lib/cargo.js
@@ -31,9 +31,6 @@ import queue from './internal/queue';
*/
/**
- * ```
- * import cargo from 'async/cargo'
- * ```
* Creates a `cargo` object with the specified payload. Tasks added to the
* cargo will be processed altogether (up to the `payload` limit). If the
* `worker` is in progress, the task is queued until it becomes available. Once
diff --git a/lib/compose.js b/lib/compose.js
index 0f87239..ff2e0ab 100644
--- a/lib/compose.js
+++ b/lib/compose.js
@@ -3,9 +3,6 @@ import seq from './seq';
var reverse = Array.prototype.reverse;
/**
- * ```
- * import compose from 'async/compose'
- * ```
* Creates a function which is a composition of the passed asynchronous
* functions. Each function consumes the return value of the function that
* follows. Composing functions `f()`, `g()`, and `h()` would produce the result
diff --git a/lib/concat.js b/lib/concat.js
index 05043c3..db23737 100644
--- a/lib/concat.js
+++ b/lib/concat.js
@@ -2,9 +2,6 @@ import concat from './internal/concat';
import doParallel from './internal/doParallel';
/**
- * ```
- * import concat from 'async/concat'
- * ```
* Applies `iteratee` to each item in `coll`, concatenating the results. Returns
* the concatenated list. The `iteratee`s are called in parallel, and the
* results are concatenated as they return. There is no guarantee that the
diff --git a/lib/concatSeries.js b/lib/concatSeries.js
index 374d8ee..c5dfb61 100644
--- a/lib/concatSeries.js
+++ b/lib/concatSeries.js
@@ -2,9 +2,6 @@ import concat from './internal/concat';
import doSeries from './internal/doSeries';
/**
- * ```
- * import concatSeries from 'async/concatSeries'
- * ```
* The same as [`concat`]{@link module:Collections.concat} but runs only a single async operation at a time.
*
* @name concatSeries
diff --git a/lib/constant.js b/lib/constant.js
index 5c325a1..c7dd50f 100644
--- a/lib/constant.js
+++ b/lib/constant.js
@@ -2,9 +2,6 @@ import rest from 'lodash/rest';
import initialParams from './internal/initialParams';
/**
- * ```
- * import constant from 'async/constant'
- * ```
* Returns a function that when called, calls-back with the values provided.
* Useful as the first function in a [`waterfall`]{@link module:ControlFlow.waterfall}, or for plugging values in to
* [`auto`]{@link module:ControlFlow.auto}.
diff --git a/lib/detect.js b/lib/detect.js
index 606ebe2..3aff790 100644
--- a/lib/detect.js
+++ b/lib/detect.js
@@ -5,9 +5,6 @@ import eachOf from './eachOf';
import findGetResult from './internal/findGetResult';
/**
- * ```
- * import detect from 'async/detect'
- * ```
* Returns the first value in `coll` that passes an async truth test. The
* `iteratee` is applied in parallel, meaning the first iteratee to return
* `true` will fire the detect `callback` with that result. That means the
diff --git a/lib/detectLimit.js b/lib/detectLimit.js
index 6911fb9..da54bd6 100644
--- a/lib/detectLimit.js
+++ b/lib/detectLimit.js
@@ -5,9 +5,6 @@ import eachOfLimit from './eachOfLimit';
import findGetResult from './internal/findGetResult';
/**
- * ```
- * import detectLimit from 'async/detectLimit'
- * ```
* The same as [`detect`]{@link module:Collections.detect} but runs a maximum of `limit` async operations at a
* time.
*
diff --git a/lib/detectSeries.js b/lib/detectSeries.js
index ac2f41c..fd29343 100644
--- a/lib/detectSeries.js
+++ b/lib/detectSeries.js
@@ -5,9 +5,6 @@ import eachOfSeries from './eachOfSeries';
import findGetResult from './internal/findGetResult';
/**
- * ```
- * import detectSeries from 'async/detectSeries'
- * ```
* The same as [`detect`]{@link module:Collections.detect} but runs only a single async operation at a time.
*
* @name detectSeries
diff --git a/lib/dir.js b/lib/dir.js
index 52ca709..912b558 100644
--- a/lib/dir.js
+++ b/lib/dir.js
@@ -1,9 +1,6 @@
import consoleFunc from './internal/consoleFunc';
/**
- * ```
- * import dir from 'async/dir'
- * ```
* Logs the result of an `async` function to the `console` using `console.dir`
* to display the properties of the resulting object. Only works in Node.js or
* in browsers that support `console.dir` and `console.error` (such as FF and
diff --git a/lib/doDuring.js b/lib/doDuring.js
index 7df8f60..d12d668 100644
--- a/lib/doDuring.js
+++ b/lib/doDuring.js
@@ -1,9 +1,6 @@
import during from './during';
/**
- * ```
- * import doDuring from 'async/doDuring'
- * ```
* The post-check version of [`during`]{@link module:ControlFlow.during}. To reflect the difference in
* the order of operations, the arguments `test` and `fn` are switched.
*
diff --git a/lib/doUntil.js b/lib/doUntil.js
index 68fb4a1..0c5bb71 100644
--- a/lib/doUntil.js
+++ b/lib/doUntil.js
@@ -1,9 +1,6 @@
import doWhilst from './doWhilst';
/**
- * ```
- * import doUtil from 'async/doUtil'
- * ```
* Like ['doWhilst']{@link module:ControlFlow.doWhilst}, except the `test` is inverted. Note the
* argument ordering differs from `until`.
*
diff --git a/lib/doWhilst.js b/lib/doWhilst.js
index 344339d..a425999 100644
--- a/lib/doWhilst.js
+++ b/lib/doWhilst.js
@@ -1,9 +1,6 @@
import whilst from './whilst';
/**
- * ```
- * import doWhilst from 'async/doWhilst'
- * ```
* The post-check version of [`whilst`]{@link module:ControlFlow.whilst}. To reflect the difference in
* the order of operations, the arguments `test` and `fn` are switched.
*
diff --git a/lib/during.js b/lib/during.js
index e6016bb..55af1b9 100644
--- a/lib/during.js
+++ b/lib/during.js
@@ -2,9 +2,6 @@ import noop from 'lodash/noop';
import rest from 'lodash/rest';
/**
- * ```
- * import during from 'async/during'
- * ```
* Like [`whilst`]{@link module:ControlFlow.whilst}, except the `test` is an asynchronous function that
* is passed a callback in the form of `function (err, truth)`. If error is
* passed to `test` or `fn`, the main callback is immediately called with the
diff --git a/lib/each.js b/lib/each.js
index eb8f242..aab1d3d 100644
--- a/lib/each.js
+++ b/lib/each.js
@@ -2,9 +2,6 @@ import eachLimit from './eachLimit';
import doLimit from './internal/doLimit';
/**
- * ```
- * import each from 'async/each'
- * ```
* Applies the function `iteratee` to each item in `coll`, in parallel.
* The `iteratee` is called with an item from the list, and a callback for when
* it has finished. If the `iteratee` passes an error to its `callback`, the
diff --git a/lib/eachLimit.js b/lib/eachLimit.js
index 6a263aa..a46eb9d 100644
--- a/lib/eachLimit.js
+++ b/lib/eachLimit.js
@@ -2,9 +2,6 @@ import eachOfLimit from './internal/eachOfLimit';
import withoutIndex from './internal/withoutIndex';
/**
- * ```
- * import eachLimit from 'async/eachLimit'
- * ```
* The same as [`each`]{@link module:Collections.each} but runs a maximum of `limit` async operations at a time.
*
* @name eachLimit
diff --git a/lib/eachOf.js b/lib/eachOf.js
index d8f46f7..b51fefb 100644
--- a/lib/eachOf.js
+++ b/lib/eachOf.js
@@ -2,9 +2,6 @@ import eachOfLimit from './eachOfLimit';
import doLimit from './internal/doLimit';
/**
- * ```
- * import eachOf from 'async/eachOf'
- * ```
* Like [`each`]{@link module:Collections.each}, except that it passes the key (or index) as the second argument
* to the iteratee.
*
diff --git a/lib/eachOfLimit.js b/lib/eachOfLimit.js
index e81d590..55d60e3 100644
--- a/lib/eachOfLimit.js
+++ b/lib/eachOfLimit.js
@@ -1,9 +1,6 @@
import _eachOfLimit from './internal/eachOfLimit';
/**
- * ```
- * import eachOfLimit from 'async/eachOfLimit'
- * ```
* The same as [`eachOf`]{@link module:Collections.eachOf} but runs a maximum of `limit` async operations at a
* time.
*
diff --git a/lib/eachOfSeries.js b/lib/eachOfSeries.js
index 103d088..32003a8 100644
--- a/lib/eachOfSeries.js
+++ b/lib/eachOfSeries.js
@@ -2,9 +2,6 @@ import eachOfLimit from './eachOfLimit';
import doLimit from './internal/doLimit';
/**
- * ```
- * import eachOfSeries from 'async/eachOfSeries'
- * ```
* The same as [`eachOf`]{@link module:Collections.eachOf} but runs only a single async operation at a time.
*
* @name eachOfSeries
diff --git a/lib/eachSeries.js b/lib/eachSeries.js
index 87fabfb..1b8e589 100644
--- a/lib/eachSeries.js
+++ b/lib/eachSeries.js
@@ -2,9 +2,6 @@ import eachLimit from './eachLimit';
import doLimit from './internal/doLimit';
/**
- * ```
- * import eachSeries from 'async/eachSeries'
- * ```
* The same as [`each`]{@link module:Collections.each} but runs only a single async operation at a time.
*
* @name eachSeries
diff --git a/lib/ensureAsync.js b/lib/ensureAsync.js
index 6ef698e..c60d07e 100644
--- a/lib/ensureAsync.js
+++ b/lib/ensureAsync.js
@@ -2,9 +2,6 @@ import setImmediate from './internal/setImmediate';
import initialParams from './internal/initialParams';
/**
- * ```
- * import ensureAsync from 'async/ensureAsync'
- * ```
* Wrap an async function and ensure it calls its callback on a later tick of
* the event loop. If the function already calls its callback on a next tick,
* no extra deferral is added. This is useful for preventing stack overflows
diff --git a/lib/every.js b/lib/every.js
index 6355218..147c54a 100644
--- a/lib/every.js
+++ b/lib/every.js
@@ -2,9 +2,6 @@ import everyLimit from './everyLimit';
import doLimit from './internal/doLimit';
/**
- * ```
- * import every from 'async/every'
- * ```
* Returns `true` if every element in `coll` satisfies an async test. If any
* iteratee call returns `false`, the main `callback` is immediately called.
*
diff --git a/lib/everyLimit.js b/lib/everyLimit.js
index a8cd65a..1ba2858 100644
--- a/lib/everyLimit.js
+++ b/lib/everyLimit.js
@@ -3,9 +3,6 @@ import eachOfLimit from './eachOfLimit';
import notId from './internal/notId';
/**
- * ```
- * import everyLimit from 'async/everyLimit'
- * ```
* The same as [`every`]{@link module:Collections.every} but runs a maximum of `limit` async operations at a time.
*
* @name everyLimit
diff --git a/lib/everySeries.js b/lib/everySeries.js
index 4333584..3cdadf0 100644
--- a/lib/everySeries.js
+++ b/lib/everySeries.js
@@ -2,9 +2,6 @@ import everyLimit from './everyLimit';
import doLimit from './internal/doLimit';
/**
- * ```
- * import everySeries from 'async/everySeries'
- * ```
* The same as [`every`]{@link module:Collections.every} but runs only a single async operation at a time.
*
* @name everySeries
diff --git a/lib/filter.js b/lib/filter.js
index b576df2..b858fea 100644
--- a/lib/filter.js
+++ b/lib/filter.js
@@ -2,9 +2,6 @@ import filterLimit from './filterLimit';
import doLimit from './internal/doLimit';
/**
- * ```
- * import filter from 'async/filter'
- * ```
* Returns a new array of all the values in `coll` which pass an async truth
* test. This operation is performed in parallel, but the results array will be
* in the same order as the original.
diff --git a/lib/filterLimit.js b/lib/filterLimit.js
index d9a43c8..6d429e8 100644
--- a/lib/filterLimit.js
+++ b/lib/filterLimit.js
@@ -2,9 +2,6 @@ import filter from './internal/filter';
import doParallelLimit from './internal/doParallelLimit';
/**
- * ```
- * import filterLimit from 'async/filterLimit'
- * ```
* The same as [`filter`]{@link module:Collections.filter} but runs a maximum of `limit` async operations at a
* time.
*
diff --git a/lib/filterSeries.js b/lib/filterSeries.js
index 1afa9b2..781e4eb 100644
--- a/lib/filterSeries.js
+++ b/lib/filterSeries.js
@@ -2,9 +2,6 @@ import filterLimit from './filterLimit';
import doLimit from './internal/doLimit';
/**
- * ```
- * import filterSeries from 'async/filterSeries'
- * ```
* The same as [`filter`]{@link module:Collections.filter} but runs only a single async operation at a time.
*
* @name filterSeries
diff --git a/lib/forever.js b/lib/forever.js
index 7f060ca..0147395 100644
--- a/lib/forever.js
+++ b/lib/forever.js
@@ -4,9 +4,6 @@ import onlyOnce from './internal/onlyOnce';
import ensureAsync from './ensureAsync';
/**
- * ```
- * import forever from 'async/forever'
- * ```
* Calls the asynchronous function `fn` with a callback parameter that allows it
* to call itself again, in series, indefinitely.
diff --git a/lib/iterator.js b/lib/iterator.js
index 1d67145..fafd960 100644
--- a/lib/iterator.js
+++ b/lib/iterator.js
@@ -1,7 +1,4 @@
/**
- * ```
- * import iterator from 'async/iterator'
- * ```
* Creates an iterator function which calls the next function in the `tasks`
* array, returning a continuation to call the next one after that. It's also
* possible to “peek” at the next iterator with `iterator.next()`.
diff --git a/lib/log.js b/lib/log.js
index 240bba1..848661d 100644
--- a/lib/log.js
+++ b/lib/log.js
@@ -1,9 +1,6 @@
import consoleFunc from './internal/consoleFunc';
/**
- * ```
- * import log from 'async/log'
- * ```
* Logs the result of an `async` function to the `console`. Only works in
* Node.js or in browsers that support `console.log` and `console.error` (such
* as FF and Chrome). If multiple arguments are returned from the async
diff --git a/lib/map.js b/lib/map.js
index 59bb682..24af6fb 100644
--- a/lib/map.js
+++ b/lib/map.js
@@ -2,9 +2,6 @@ import mapLimit from './mapLimit';
import doLimit from './internal/doLimit';
/**
- * ```
- * import map from 'async/map'
- * ```
* Produces a new collection of values by mapping each value in `coll` through
* the `iteratee` function. The `iteratee` is called with an item from `coll`
* and a callback for when it has finished processing. Each of these callback
diff --git a/lib/mapLimit.js b/lib/mapLimit.js
index 1d3d3b2..efaff2b 100644
--- a/lib/mapLimit.js
+++ b/lib/mapLimit.js
@@ -2,9 +2,6 @@ import doParallelLimit from './internal/doParallelLimit';
import map from './internal/map';
/**
- * ```
- * import mapLimit from 'async/mapLimit'
- * ```
* The same as [`map`]{@link module:Collections.map} but runs a maximum of `limit` async operations at a time.
*
* @name mapLimit
diff --git a/lib/mapSeries.js b/lib/mapSeries.js
index 5e39065..24ce126 100644
--- a/lib/mapSeries.js
+++ b/lib/mapSeries.js
@@ -2,9 +2,6 @@ import mapLimit from './mapLimit';
import doLimit from './internal/doLimit';
/**
- * ```
- * import mapSeries from 'async/mapSeries'
- * ```
* The same as [`map`]{@link module:Collections.map} but runs only a single async operation at a time.
*
* @name mapSeries
diff --git a/lib/mapValues.js b/lib/mapValues.js
index 1f19e3e..240fc67 100644
--- a/lib/mapValues.js
+++ b/lib/mapValues.js
@@ -3,9 +3,6 @@ import doLimit from './internal/doLimit';
/**
- * ```
- * import mapValues from 'async/mapValues'
- * ```
* A relative of [`map`]{@link module:Collections.map}, designed for use with objects.
*
* Produces a new Object by mapping each value of `obj` through the `iteratee`
diff --git a/lib/mapValuesLimit.js b/lib/mapValuesLimit.js
index 0f3584a..bced034 100644
--- a/lib/mapValuesLimit.js
+++ b/lib/mapValuesLimit.js
@@ -1,9 +1,6 @@
import eachOfLimit from './eachOfLimit';
/**
- * ```
- * import mapValuesLimit from 'async/mapValuesLimit'
- * ```
* The same as [`mapValues`]{@link module:Collections.mapValues} but runs a maximum of `limit` async operations at a
* time.
*
diff --git a/lib/mapValuesSeries.js b/lib/mapValuesSeries.js
index e9746a1..b97fcd1 100644
--- a/lib/mapValuesSeries.js
+++ b/lib/mapValuesSeries.js
@@ -2,9 +2,6 @@ import mapValuesLimit from './mapValuesLimit';
import doLimit from './internal/doLimit';
/**
- * ```
- * import mapValuesSeries from 'async/mapValuesSeries'
- * ```
* The same as [`mapValues`]{@link module:Collections.mapValues} but runs only a single async operation at a time.
*
* @name mapValuesSeries
diff --git a/lib/memoize.js b/lib/memoize.js
index 3e2ee32..31c041c 100644
--- a/lib/memoize.js
+++ b/lib/memoize.js
@@ -9,9 +9,6 @@ function has(obj, key) {
}
/**
- * ```
- * import memoize from 'async/memoize'
- * ```
* Caches the results of an `async` function. When creating a hash to store
* function results against, the callback is omitted from the hash and an
* optional hash function can be used.
diff --git a/lib/nextTick.js b/lib/nextTick.js
index 1959c84..62d20de 100644
--- a/lib/nextTick.js
+++ b/lib/nextTick.js
@@ -3,9 +3,6 @@
import { hasNextTick, hasSetImmediate, fallback, wrap } from './internal/setImmediate';
/**
- * ```
- * import nextTick from 'async/nextTick'
- * ```
* Calls `callback` on a later loop around the event loop. In Node.js this just
* calls `setImmediate`. In the browser it will use `setImmediate` if
* available, otherwise `setTimeout(callback, 0)`, which means other higher
diff --git a/lib/parallel.js b/lib/parallel.js
index 9df6bd6..1f6a3cc 100644
--- a/lib/parallel.js
+++ b/lib/parallel.js
@@ -2,9 +2,6 @@ import parallelLimit from './parallelLimit';
import doLimit from './internal/doLimit';
/**
- * ```
- * import parallel from 'async/parallel'
- * ```
* Run the `tasks` collection of functions in parallel, without waiting until
* the previous function has completed. If any of the functions pass an error to
* its callback, the main `callback` is immediately called with the value of the
diff --git a/lib/parallelLimit.js b/lib/parallelLimit.js
index 7057bd0..926fa85 100644
--- a/lib/parallelLimit.js
+++ b/lib/parallelLimit.js
@@ -2,9 +2,6 @@ import eachOfLimit from './internal/eachOfLimit';
import parallel from './internal/parallel';
/**
- * ```
- * import parallelLimit from 'async/parallelLimit'
- * ```
* The same as [`parallel`]{@link module:ControlFlow.parallel} but runs a maximum of `limit` async operations at a
* time.
*
diff --git a/lib/priorityQueue.js b/lib/priorityQueue.js
index 4162311..9ea24bc 100644
--- a/lib/priorityQueue.js
+++ b/lib/priorityQueue.js
@@ -7,9 +7,6 @@ import setImmediate from './setImmediate';
import queue from './queue';
/**
- * ```
- * import priorityQueue from 'async/priorityQueue'
- * ```
* The same as [async.queue]{@link module:ControlFlow.queue} only tasks are assigned a priority and
* completed in ascending priority order.
*
diff --git a/lib/queue.js b/lib/queue.js
index 5f032d7..109ba50 100644
--- a/lib/queue.js
+++ b/lib/queue.js
@@ -48,9 +48,6 @@ import queue from './internal/queue';
*/
/**
- * ```
- * import queue from 'async/queue'
- * ```
* Creates a `queue` object with the specified `concurrency`. Tasks added to the
* `queue` are processed in parallel (up to the `concurrency` limit). If all
* `worker`s are in progress, the task is queued until one becomes available.
diff --git a/lib/race.js b/lib/race.js
index 8efece4..893e860 100644
--- a/lib/race.js
+++ b/lib/race.js
@@ -4,9 +4,6 @@ import noop from 'lodash/noop';
import once from './internal/once';
/**
- * ```
- * import race from 'async/race'
- * ```
* Runs the `tasks` array of functions in parallel, without waiting until the
* previous function has completed. Once any the `tasks` completed or pass an
* error to its callback, the main `callback` is immediately called. It's
diff --git a/lib/reduce.js b/lib/reduce.js
index d870c9d..8145db7 100644
--- a/lib/reduce.js
+++ b/lib/reduce.js
@@ -1,9 +1,6 @@
import eachOfSeries from './eachOfSeries';
/**
- * ```
- * import reduce from 'async/reduce'
- * ```
* Reduces `coll` into a single value using an async `iteratee` to return each
* successive step. `memo` is the initial state of the reduction. This function
* only operates in series.
diff --git a/lib/reduceRight.js b/lib/reduceRight.js
index b3090d9..69fd158 100644
--- a/lib/reduceRight.js
+++ b/lib/reduceRight.js
@@ -3,9 +3,6 @@ import reduce from './reduce';
var slice = Array.prototype.slice;
/**
- * ```
- * import reduceRight from 'async/reduceRight'
- * ```
* Same as [`reduce`]{@link module:Collections.reduce}, only operates on `coll` in reverse order.
*
* @name reduceRight
diff --git a/lib/reflect.js b/lib/reflect.js
index a8b7438..ac5345d 100644
--- a/lib/reflect.js
+++ b/lib/reflect.js
@@ -2,9 +2,6 @@ import initialParams from './internal/initialParams';
import rest from 'lodash/rest';
/**
- * ```
- * import reflect from 'async/reflect'
- * ```
* Wraps the function in another function that always returns data even when it
* errors.
*
diff --git a/lib/reflectAll.js b/lib/reflectAll.js
index 160334c..a9fe48f 100644
--- a/lib/reflectAll.js
+++ b/lib/reflectAll.js
@@ -1,9 +1,6 @@
import reflect from './reflect';
/**
- * ```
- * import reflectAll from 'async/reflectAll'
- * ```
* A helper function that wraps an array of functions with reflect.
*
* @name reflectAll
diff --git a/lib/reject.js b/lib/reject.js
index dd54453..f882a93 100644
--- a/lib/reject.js
+++ b/lib/reject.js
@@ -2,9 +2,6 @@ import rejectLimit from './rejectLimit';
import doLimit from './internal/doLimit';
/**
- * ```
- * import reject from 'async/reject'
- * ```
* The opposite of [`filter`]{@link module:Collections.filter}. Removes values that pass an `async` truth test.
*
* @name reject
diff --git a/lib/rejectLimit.js b/lib/rejectLimit.js
index 78c2def..2a57bc7 100644
--- a/lib/rejectLimit.js
+++ b/lib/rejectLimit.js
@@ -2,9 +2,6 @@ import reject from './internal/reject';
import doParallelLimit from './internal/doParallelLimit';
/**
- * ```
- * import rejectLimit from 'async/rejectLimit'
- * ```
* The same as [`reject`]{@link module:Collections.reject} but runs a maximum of `limit` async operations at a
* time.
*
diff --git a/lib/rejectSeries.js b/lib/rejectSeries.js
index a691536..0844864 100644
--- a/lib/rejectSeries.js
+++ b/lib/rejectSeries.js
@@ -2,9 +2,6 @@ import rejectLimit from './rejectLimit';
import doLimit from './internal/doLimit';
/**
- * ```
- * import rejectSeries from 'async/rejectSeries'
- * ```
* The same as [`reject`]{@link module:Collections.reject} but runs only a single async operation at a time.
*
* @name rejectSeries
diff --git a/lib/retry.js b/lib/retry.js
index b137a0d..5c22af3 100644
--- a/lib/retry.js
+++ b/lib/retry.js
@@ -3,9 +3,6 @@ import noop from 'lodash/noop';
import constant from 'lodash/constant';
/**
- * ```
- * import retry from 'async/retry'
- * ```
* Attempts to get a successful response from `task` no more than `times` times
* before returning an error. If the task is successful, the `callback` will be
* passed the result of the successful task. If all attempts fail, the callback
diff --git a/lib/retryable.js b/lib/retryable.js
index ad47351..00fd8f2 100644
--- a/lib/retryable.js
+++ b/lib/retryable.js
@@ -2,9 +2,6 @@ import retry from './retry';
import initialParams from './internal/initialParams';
/**
- * ```
- * import retryable from 'async/retryable'
- * ```
* A close relative of [`retry`]{@link module:ControlFlow.retry}. This method wraps a task and makes it
* retryable, rather than immediately calling it with retries.
*
diff --git a/lib/seq.js b/lib/seq.js
index 5f4e74e..01355b1 100644
--- a/lib/seq.js
+++ b/lib/seq.js
@@ -3,9 +3,6 @@ import rest from 'lodash/rest';
import reduce from './reduce';
/**
- * ```
- * import seq from 'async/seq'
- * ```
* Version of the compose function that is more natural to read. Each function
* consumes the return value of the previous function. It is the equivalent of
* [compose]{@link module:ControlFlow.compose} with the arguments reversed.
diff --git a/lib/series.js b/lib/series.js
index 1877e81..1969943 100644
--- a/lib/series.js
+++ b/lib/series.js
@@ -2,9 +2,6 @@ import parallel from './internal/parallel';
import eachOfSeries from './eachOfSeries';
/**
- * ```
- * import series from 'async/series'
- * ```
* Run the functions in the `tasks` collection in series, each one running once
* the previous function has completed. If any functions in the series pass an
* error to its callback, no more functions are run, and `callback` is
diff --git a/lib/setImmediate.js b/lib/setImmediate.js
index 1b545a5..f820b46 100644
--- a/lib/setImmediate.js
+++ b/lib/setImmediate.js
@@ -1,9 +1,6 @@
import setImmediate from './internal/setImmediate';
/**
- * ```
- * import setImmediate from 'async/setImmediate'
- * ```
* Calls `callback` on a later loop around the event loop. In Node.js this just
* calls `setImmediate`. In the browser it will use `setImmediate` if
* available, otherwise `setTimeout(callback, 0)`, which means other higher
diff --git a/lib/some.js b/lib/some.js
index 83bed71..ff777e5 100644
--- a/lib/some.js
+++ b/lib/some.js
@@ -2,9 +2,6 @@ import someLimit from './someLimit';
import doLimit from './internal/doLimit';
/**
- * ```
- * import some from 'async/some'
- * ```
* Returns `true` if at least one element in the `coll` satisfies an async test.
* If any iteratee call returns `true`, the main `callback` is immediately
* called.
diff --git a/lib/someLimit.js b/lib/someLimit.js
index b3920f1..ad65721 100644
--- a/lib/someLimit.js
+++ b/lib/someLimit.js
@@ -3,9 +3,6 @@ import eachOfLimit from './eachOfLimit';
import identity from 'lodash/identity';
/**
- * ```
- * import someLimit from 'async/someLimit'
- * ```
* The same as [`some`]{@link module:Collections.some} but runs a maximum of `limit` async operations at a time.
*
* @name someLimit
diff --git a/lib/someSeries.js b/lib/someSeries.js
index feec58f..cc30c36 100644
--- a/lib/someSeries.js
+++ b/lib/someSeries.js
@@ -2,9 +2,6 @@ import someLimit from './someLimit';
import doLimit from './internal/doLimit';
/**
- * ```
- * import someSeries from 'async/someSeries'
- * ```
* The same as [`some`]{@link module:Collections.some} but runs only a single async operation at a time.
*
* @name someSeries
diff --git a/lib/sortBy.js b/lib/sortBy.js
index f96b1ab..ab6c420 100644
--- a/lib/sortBy.js
+++ b/lib/sortBy.js
@@ -4,9 +4,6 @@ import property from 'lodash/_baseProperty';
import map from './map';
/**
- * ```
- * import sortBy from 'async/sortBy'
- * ```
* Sorts a list by the results of running each `coll` value through an async
* `iteratee`.
*
diff --git a/lib/timeout.js b/lib/timeout.js
index f2643ac..7caba44 100644
--- a/lib/timeout.js
+++ b/lib/timeout.js
@@ -1,9 +1,6 @@
import initialParams from './internal/initialParams';
/**
- * ```
- * import timeout from 'async/timeout'
- * ```
* Sets a time limit on an asynchronous function. If the function does not call
* its callback within the specified milliseconds, it will be called with a
* timeout error. The code property for the error object will be `'ETIMEDOUT'`.
diff --git a/lib/times.js b/lib/times.js
index e6e4187..bdd2e6b 100644
--- a/lib/times.js
+++ b/lib/times.js
@@ -2,9 +2,6 @@ import timesLimit from './timesLimit';
import doLimit from './internal/doLimit';
/**
- * ```
- * import times from 'async/times'
- * ```
* Calls the `iteratee` function `n` times, and accumulates results in the same
* manner you would use with [map]{@link module:Collections.map}.
*
diff --git a/lib/timesLimit.js b/lib/timesLimit.js
index 01a6399..68d5ede 100644
--- a/lib/timesLimit.js
+++ b/lib/timesLimit.js
@@ -2,9 +2,6 @@ import mapLimit from './mapLimit';
import range from 'lodash/_baseRange';
/**
- * ```
- * import timesLimit from 'async/timesLimit'
- * ```
* The same as [times]{@link module:ControlFlow.times} but runs a maximum of `limit` async operations at a
* time.
*
diff --git a/lib/timesSeries.js b/lib/timesSeries.js
index adef004..672428d 100644
--- a/lib/timesSeries.js
+++ b/lib/timesSeries.js
@@ -2,9 +2,6 @@ import timesLimit from './timesLimit';
import doLimit from './internal/doLimit';
/**
- * ```
- * import timesSeries from 'async/timesSeries'
- * ```
* The same as [times]{@link module:ControlFlow.times} but runs only a single async operation at a time.
*
* @name timesSeries
diff --git a/lib/transform.js b/lib/transform.js
index 854df2f..6098522 100644
--- a/lib/transform.js
+++ b/lib/transform.js
@@ -3,9 +3,6 @@ import isArray from 'lodash/isArray';
import eachOf from './eachOf';
/**
- * ```
- * import transform from 'async/transform'
- * ```
* A relative of `reduce`. Takes an Object or Array, and iterates over each
* element in series, each step potentially mutating an `accumulator` value.
* The type of the accumulator defaults to the type of collection passed in.
diff --git a/lib/unmemoize.js b/lib/unmemoize.js
index f0c65a3..4b2db4d 100644
--- a/lib/unmemoize.js
+++ b/lib/unmemoize.js
@@ -1,7 +1,4 @@
/**
- * ```
- * import unmemoize from 'async/unmemoize'
- * ```
* Undoes a [memoize]{@link module:Utils.memoize}d function, reverting it to the original,
* unmemoized form. Handy for testing.
*
diff --git a/lib/until.js b/lib/until.js
index 23a3ca5..7b0b0b5 100644
--- a/lib/until.js
+++ b/lib/until.js
@@ -1,9 +1,6 @@
import whilst from './whilst';
/**
- * ```
- * import whilst from 'async/whilst'
- * ```
* Repeatedly call `fn` until `test` returns `true`. Calls `callback` when
* stopped, or an error occurs. `callback` will be passed an error and any
* arguments passed to the final `fn`'s callback.
diff --git a/lib/waterfall.js b/lib/waterfall.js
index 36a66f7..b3f0dbc 100644
--- a/lib/waterfall.js
+++ b/lib/waterfall.js
@@ -6,9 +6,6 @@ import rest from 'lodash/rest';
import onlyOnce from './internal/onlyOnce';
/**
- *```
- * import waterfall from 'async/waterfall'
- * ```
* Runs the `tasks` array of functions in series, each passing their results to
* the next in the array. However, if any of the `tasks` pass an error to their
* own callback, the next function is not executed, and the main `callback` is
diff --git a/lib/whilst.js b/lib/whilst.js
index 1cfb157..3311f4c 100644
--- a/lib/whilst.js
+++ b/lib/whilst.js
@@ -2,9 +2,6 @@ import noop from 'lodash/noop';
import rest from 'lodash/rest';
/**
- * ```
- * import whilst from 'async/whilst'
- * ```
* Repeatedly call `fn`, while `test` returns `true`. Calls `callback` when
* stopped, or an error occurs.
*
diff --git a/support/jsdoc-import-path-plugin.js b/support/jsdoc-import-path-plugin.js
new file mode 100644
index 0000000..3f0937f
--- /dev/null
+++ b/support/jsdoc-import-path-plugin.js
@@ -0,0 +1,21 @@
+const path = require('path');
+
+exports.handlers = {
+ jsdocCommentFound: function(e) {
+ var moduleName = path.parse(e.filename).name;
+
+
+ var lines = e.comment.split(/\r?\n/);
+
+ var importLines = [
+ '```',
+ `import ${moduleName} from 'async/${moduleName}';`,
+ '```'
+ ];
+
+ if (moduleName !== 'index') {
+ e.comment = [lines[0], ...importLines, ...lines.slice(1)].join("\n");
+ }
+
+ }
+};
diff --git a/support/jsdoc.json b/support/jsdoc.json
index 544db31..a0e0daa 100644
--- a/support/jsdoc.json
+++ b/support/jsdoc.json
@@ -6,7 +6,7 @@
"source": {
"include": [ "./lib" ]
},
- "plugins": ["plugins/markdown"],
+ "plugins": ["plugins/markdown", "./jsdoc-import-path-plugin"],
"opts": {
"readme": "README.md",
"template": "node_modules/minami",