Skip to content

Commit b464768

Browse files
authored
Merge pull request #1327 from caolan/lib-import-cleanups
Cleanup some of the dependency imports
2 parents bced3de + b6d0528 commit b464768

21 files changed

+29
-27
lines changed

lib/apply.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import rest from 'lodash/_baseRest';
1+
import rest from './internal/rest';
22

33
/**
44
* Creates a continuation function with some arguments already applied.

lib/auto.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import indexOf from 'lodash/_baseIndexOf';
44
import isArray from 'lodash/isArray';
55
import okeys from 'lodash/keys';
66
import noop from 'lodash/noop';
7-
import rest from 'lodash/_baseRest';
7+
import rest from './internal/rest';
88

99
import once from './internal/once';
1010
import onlyOnce from './internal/onlyOnce';

lib/autoInject.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import auto from './auto';
22
import forOwn from 'lodash/_baseForOwn';
33
import arrayMap from 'lodash/_arrayMap';
4-
import clone from 'lodash/_copyArray';
54
import isArray from 'lodash/isArray';
65
import trim from 'lodash/trim';
76

@@ -109,8 +108,8 @@ export default function autoInject(tasks, callback) {
109108
var params;
110109

111110
if (isArray(taskFn)) {
112-
params = clone(taskFn);
113-
taskFn = params.pop();
111+
params = taskFn.slice(0, -1);
112+
taskFn = taskFn[taskFn.length - 1];
114113

115114
newTasks[key] = params.concat(params.length > 0 ? newTask : taskFn);
116115
} else if (taskFn.length === 1) {

lib/compose.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import seq from './seq';
2-
import rest from 'lodash/_baseRest';
2+
import rest from './internal/rest';
33

44
/**
55
* Creates a function which is a composition of the passed asynchronous

lib/constant.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import rest from 'lodash/_baseRest';
1+
import rest from './internal/rest';
22
import initialParams from './internal/initialParams';
33

44
/**

lib/doDuring.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import noop from 'lodash/noop';
2-
import rest from 'lodash/_baseRest';
2+
import rest from './internal/rest';
33
import onlyOnce from './internal/onlyOnce';
44

55
/**

lib/doWhilst.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import noop from 'lodash/noop';
2-
import rest from 'lodash/_baseRest';
2+
import rest from './internal/rest';
33

44
import onlyOnce from './internal/onlyOnce';
55

lib/internal/applyEach.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import rest from 'lodash/_baseRest';
1+
import rest from './rest';
22
import initialParams from './initialParams';
33

44
export default function applyEach(eachfn) {

lib/internal/consoleFunc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import arrayEach from 'lodash/_arrayEach';
2-
import rest from 'lodash/_baseRest';
2+
import rest from './rest';
33

44
export default function consoleFunc(name) {
55
return rest(function (fn, args) {

lib/internal/initialParams.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import rest from 'lodash/_baseRest';
1+
import rest from './rest';
22

33
export default function (fn) {
44
return rest(function (args/*..., callback*/) {

0 commit comments

Comments
 (0)