Skip to content

Commit

Permalink
be explicit (#1769)
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmywarting authored Nov 16, 2021
1 parent 9440649 commit bb41f2a
Show file tree
Hide file tree
Showing 88 changed files with 291 additions and 298 deletions.
4 changes: 2 additions & 2 deletions lib/applyEach.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import applyEach from './internal/applyEach';
import map from './map';
import applyEach from './internal/applyEach.js'
import map from './map.js'

/**
* Applies the provided arguments to each function in the array, calling
Expand Down
4 changes: 2 additions & 2 deletions lib/applyEachSeries.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import applyEach from './internal/applyEach';
import mapSeries from './mapSeries';
import applyEach from './internal/applyEach.js'
import mapSeries from './mapSeries.js'

/**
* The same as [`applyEach`]{@link module:ControlFlow.applyEach} but runs only a single async operation at a time.
Expand Down
6 changes: 3 additions & 3 deletions lib/asyncify.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import initialParams from './internal/initialParams';
import setImmediate from './internal/setImmediate';
import { isAsync } from './internal/wrapAsync'
import initialParams from './internal/initialParams.js'
import setImmediate from './internal/setImmediate.js'
import { isAsync } from './internal/wrapAsync.js'

/**
* Take a sync function and make it async, passing its return value to a
Expand Down
8 changes: 4 additions & 4 deletions lib/auto.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import once from './internal/once';
import onlyOnce from './internal/onlyOnce';
import wrapAsync from './internal/wrapAsync';
import { promiseCallback, PROMISE_SYMBOL } from './internal/promiseCallback'
import once from './internal/once.js'
import onlyOnce from './internal/onlyOnce.js'
import wrapAsync from './internal/wrapAsync.js'
import { promiseCallback, PROMISE_SYMBOL } from './internal/promiseCallback.js'

/**
* Determines the best order for running the {@link AsyncFunction}s in `tasks`, based on
Expand Down
6 changes: 3 additions & 3 deletions lib/autoInject.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import auto from './auto';
import wrapAsync from './internal/wrapAsync';
import { isAsync } from './internal/wrapAsync';
import auto from './auto.js'
import wrapAsync from './internal/wrapAsync.js'
import { isAsync } from './internal/wrapAsync.js'

var FN_ARGS = /^(?:async\s+)?(?:function)?\s*\w*\s*\(\s*([^)]+)\s*\)(?:\s*{)/;
var ARROW_FN_ARGS = /^(?:async\s+)?\(?\s*([^)=]+)\s*\)?(?:\s*=>)/;
Expand Down
2 changes: 1 addition & 1 deletion lib/cargo.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import queue from './internal/queue';
import queue from './internal/queue.js'

/**
* Creates a `cargo` object with the specified payload. Tasks added to the
Expand Down
2 changes: 1 addition & 1 deletion lib/cargoQueue.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import queue from './internal/queue';
import queue from './internal/queue.js'

/**
* Creates a `cargoQueue` object with the specified payload. Tasks added to the
Expand Down
2 changes: 1 addition & 1 deletion lib/compose.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import seq from './seq';
import seq from './seq.js'

/**
* Creates a function which is a composition of the passed asynchronous
Expand Down
4 changes: 2 additions & 2 deletions lib/concat.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import concatLimit from './concatLimit';
import awaitify from './internal/awaitify'
import concatLimit from './concatLimit.js'
import awaitify from './internal/awaitify.js'

/**
* Applies `iteratee` to each item in `coll`, concatenating the results. Returns
Expand Down
6 changes: 3 additions & 3 deletions lib/concatLimit.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import wrapAsync from './internal/wrapAsync';
import mapLimit from './mapLimit';
import awaitify from './internal/awaitify'
import wrapAsync from './internal/wrapAsync.js'
import mapLimit from './mapLimit.js'
import awaitify from './internal/awaitify.js'

/**
* The same as [`concat`]{@link module:Collections.concat} but runs a maximum of `limit` async operations at a time.
Expand Down
4 changes: 2 additions & 2 deletions lib/concatSeries.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import concatLimit from './concatLimit';
import awaitify from './internal/awaitify'
import concatLimit from './concatLimit.js'
import awaitify from './internal/awaitify.js'

/**
* The same as [`concat`]{@link module:Collections.concat} but runs only a single async operation at a time.
Expand Down
6 changes: 3 additions & 3 deletions lib/detect.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import createTester from './internal/createTester';
import eachOf from './eachOf'
import awaitify from './internal/awaitify'
import createTester from './internal/createTester.js'
import eachOf from './eachOf.js'
import awaitify from './internal/awaitify.js'

/**
* Returns the first value in `coll` that passes an async truth test. The
Expand Down
6 changes: 3 additions & 3 deletions lib/detectLimit.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import createTester from './internal/createTester';
import eachOfLimit from './internal/eachOfLimit'
import awaitify from './internal/awaitify'
import createTester from './internal/createTester.js'
import eachOfLimit from './internal/eachOfLimit.js'
import awaitify from './internal/awaitify.js'

/**
* The same as [`detect`]{@link module:Collections.detect} but runs a maximum of `limit` async operations at a
Expand Down
6 changes: 3 additions & 3 deletions lib/detectSeries.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import createTester from './internal/createTester'
import eachOfLimit from './internal/eachOfLimit'
import awaitify from './internal/awaitify'
import createTester from './internal/createTester.js'
import eachOfLimit from './internal/eachOfLimit.js'
import awaitify from './internal/awaitify.js'

/**
* The same as [`detect`]{@link module:Collections.detect} but runs only a single async operation at a time.
Expand Down
2 changes: 1 addition & 1 deletion lib/dir.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import consoleFunc from './internal/consoleFunc';
import consoleFunc from './internal/consoleFunc.js'

/**
* Logs the result of an [`async` function]{@link AsyncFunction} to the
Expand Down
4 changes: 2 additions & 2 deletions lib/doUntil.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import doWhilst from './doWhilst';
import wrapAsync from './internal/wrapAsync';
import doWhilst from './doWhilst.js'
import wrapAsync from './internal/wrapAsync.js'

/**
* Like ['doWhilst']{@link module:ControlFlow.doWhilst}, except the `test` is inverted. Note the
Expand Down
6 changes: 3 additions & 3 deletions lib/doWhilst.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import onlyOnce from './internal/onlyOnce';
import wrapAsync from './internal/wrapAsync';
import awaitify from './internal/awaitify'
import onlyOnce from './internal/onlyOnce.js'
import wrapAsync from './internal/wrapAsync.js'
import awaitify from './internal/awaitify.js'

/**
* The post-check version of [`whilst`]{@link module:ControlFlow.whilst}. To reflect the difference in
Expand Down
8 changes: 4 additions & 4 deletions lib/each.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import eachOf from './eachOf';
import withoutIndex from './internal/withoutIndex';
import wrapAsync from './internal/wrapAsync'
import awaitify from './internal/awaitify'
import eachOf from './eachOf.js'
import withoutIndex from './internal/withoutIndex.js'
import wrapAsync from './internal/wrapAsync.js'
import awaitify from './internal/awaitify.js'

/**
* Applies the function `iteratee` to each item in `coll`, in parallel.
Expand Down
8 changes: 4 additions & 4 deletions lib/eachLimit.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import eachOfLimit from './internal/eachOfLimit';
import withoutIndex from './internal/withoutIndex';
import wrapAsync from './internal/wrapAsync';
import awaitify from './internal/awaitify'
import eachOfLimit from './internal/eachOfLimit.js'
import withoutIndex from './internal/withoutIndex.js'
import wrapAsync from './internal/wrapAsync.js'
import awaitify from './internal/awaitify.js'

/**
* The same as [`each`]{@link module:Collections.each} but runs a maximum of `limit` async operations at a time.
Expand Down
14 changes: 7 additions & 7 deletions lib/eachOf.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import isArrayLike from './internal/isArrayLike';
import breakLoop from './internal/breakLoop';
import eachOfLimit from './eachOfLimit';
import once from './internal/once';
import onlyOnce from './internal/onlyOnce';
import wrapAsync from './internal/wrapAsync';
import awaitify from './internal/awaitify'
import isArrayLike from './internal/isArrayLike.js'
import breakLoop from './internal/breakLoop.js'
import eachOfLimit from './eachOfLimit.js'
import once from './internal/once.js'
import onlyOnce from './internal/onlyOnce.js'
import wrapAsync from './internal/wrapAsync.js'
import awaitify from './internal/awaitify.js'

// eachOf implementation optimized for array-likes
function eachOfArrayLike(coll, iteratee, callback) {
Expand Down
6 changes: 3 additions & 3 deletions lib/eachOfLimit.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import _eachOfLimit from './internal/eachOfLimit';
import wrapAsync from './internal/wrapAsync';
import awaitify from './internal/awaitify'
import _eachOfLimit from './internal/eachOfLimit.js'
import wrapAsync from './internal/wrapAsync.js'
import awaitify from './internal/awaitify.js'

/**
* The same as [`eachOf`]{@link module:Collections.eachOf} but runs a maximum of `limit` async operations at a
Expand Down
4 changes: 2 additions & 2 deletions lib/eachOfSeries.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import eachOfLimit from './eachOfLimit';
import awaitify from './internal/awaitify'
import eachOfLimit from './eachOfLimit.js'
import awaitify from './internal/awaitify.js'

/**
* The same as [`eachOf`]{@link module:Collections.eachOf} but runs only a single async operation at a time.
Expand Down
4 changes: 2 additions & 2 deletions lib/eachSeries.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import eachLimit from './eachLimit';
import awaitify from './internal/awaitify'
import eachLimit from './eachLimit.js'
import awaitify from './internal/awaitify.js'

/**
* The same as [`each`]{@link module:Collections.each} but runs only a single async operation at a time.
Expand Down
4 changes: 2 additions & 2 deletions lib/ensureAsync.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import setImmediate from './internal/setImmediate';
import { isAsync } from './internal/wrapAsync';
import setImmediate from './internal/setImmediate.js'
import { isAsync } from './internal/wrapAsync.js'

/**
* Wrap an async function and ensure it calls its callback on a later tick of
Expand Down
6 changes: 3 additions & 3 deletions lib/every.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import createTester from './internal/createTester';
import eachOf from './eachOf'
import awaitify from './internal/awaitify'
import createTester from './internal/createTester.js'
import eachOf from './eachOf.js'
import awaitify from './internal/awaitify.js'

/**
* Returns `true` if every element in `coll` satisfies an async test. If any
Expand Down
6 changes: 3 additions & 3 deletions lib/everyLimit.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import createTester from './internal/createTester';
import eachOfLimit from './internal/eachOfLimit'
import awaitify from './internal/awaitify'
import createTester from './internal/createTester.js'
import eachOfLimit from './internal/eachOfLimit.js'
import awaitify from './internal/awaitify.js'

/**
* The same as [`every`]{@link module:Collections.every} but runs a maximum of `limit` async operations at a time.
Expand Down
6 changes: 3 additions & 3 deletions lib/everySeries.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import createTester from './internal/createTester';
import eachOfSeries from './eachOfSeries';
import awaitify from './internal/awaitify';
import createTester from './internal/createTester.js'
import eachOfSeries from './eachOfSeries.js'
import awaitify from './internal/awaitify.js'

/**
* The same as [`every`]{@link module:Collections.every} but runs only a single async operation at a time.
Expand Down
6 changes: 3 additions & 3 deletions lib/filter.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import _filter from './internal/filter';
import eachOf from './eachOf'
import awaitify from './internal/awaitify'
import _filter from './internal/filter.js'
import eachOf from './eachOf.js'
import awaitify from './internal/awaitify.js'

/**
* Returns a new array of all the values in `coll` which pass an async truth
Expand Down
6 changes: 3 additions & 3 deletions lib/filterLimit.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import _filter from './internal/filter';
import eachOfLimit from './internal/eachOfLimit'
import awaitify from './internal/awaitify'
import _filter from './internal/filter.js'
import eachOfLimit from './internal/eachOfLimit.js'
import awaitify from './internal/awaitify.js'

/**
* The same as [`filter`]{@link module:Collections.filter} but runs a maximum of `limit` async operations at a
Expand Down
6 changes: 3 additions & 3 deletions lib/filterSeries.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import _filter from './internal/filter';
import eachOfSeries from './eachOfSeries'
import awaitify from './internal/awaitify'
import _filter from './internal/filter.js'
import eachOfSeries from './eachOfSeries.js'
import awaitify from './internal/awaitify.js'

/**
* The same as [`filter`]{@link module:Collections.filter} but runs only a single async operation at a time.
Expand Down
8 changes: 4 additions & 4 deletions lib/forever.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import onlyOnce from './internal/onlyOnce';
import ensureAsync from './ensureAsync';
import wrapAsync from './internal/wrapAsync';
import awaitify from './internal/awaitify'
import onlyOnce from './internal/onlyOnce.js'
import ensureAsync from './ensureAsync.js'
import wrapAsync from './internal/wrapAsync.js'
import awaitify from './internal/awaitify.js'

/**
* Calls the asynchronous function `fn` with a callback parameter that allows it
Expand Down
2 changes: 1 addition & 1 deletion lib/groupBy.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import groupByLimit from './groupByLimit';
import groupByLimit from './groupByLimit.js'

/**
* Returns a new object, where each value corresponds to an array of items, from
Expand Down
6 changes: 3 additions & 3 deletions lib/groupByLimit.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import mapLimit from './mapLimit';
import wrapAsync from './internal/wrapAsync';
import awaitify from './internal/awaitify'
import mapLimit from './mapLimit.js'
import wrapAsync from './internal/wrapAsync.js'
import awaitify from './internal/awaitify.js'

/**
* The same as [`groupBy`]{@link module:Collections.groupBy} but runs a maximum of `limit` async operations at a time.
Expand Down
2 changes: 1 addition & 1 deletion lib/groupBySeries.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import groupByLimit from './groupByLimit';
import groupByLimit from './groupByLimit.js'

/**
* The same as [`groupBy`]{@link module:Collections.groupBy} but runs only a single async operation at a time.
Expand Down
Loading

0 comments on commit bb41f2a

Please sign in to comment.