-
-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove lodash modules #30
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple things - commented inline
lib/helpers.js
Outdated
@@ -25,8 +25,12 @@ function buildOnSettled(done) { | |||
return done(error, null); | |||
} | |||
|
|||
var settledErrors = filter(result, { state: 'error' }); | |||
var settledResults = filter(result, { state: 'success' }); | |||
var settledErrors = filter(result, function(elem) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This anonymous function used as the 2nd parameter to filter
can be a named function and moved to the top level (similar to the getExtensions
function above)
You can probably name it filterError
lib/helpers.js
Outdated
var settledErrors = filter(result, function(elem) { | ||
return elem.state === 'error'; | ||
}); | ||
var settledResults = filter(result, function(elem) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This anonymous function used as the 2nd parameter to filter
can be a named function and moved to the top level (similar to the getExtensions
function above)
You can probably name it filterSuccess
"arr-filter": "^1.1.1", | ||
"arr-flatten": "^1.0.1", | ||
"arr-map": "^2.0.0", | ||
"array-each": "^0.1.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I opened an issue on array-each
to bump to 1.0 - ref jonschlinkert/array-each#1
Hoping to get that bumped before merging this.
Github Issue: #28
Remove lodash modules, and replace them with:
flatten
: https://github.com/jonschlinkert/arr-flattenmap
: https://github.com/jonschlinkert/arr-maplast
: https://github.com/jonschlinkert/array-lastfilter
: https://github.com/jonschlinkert/arr-filtereach
: https://github.com/jonschlinkert/array-eachinitial
: https://github.com/jonschlinkert/array-initial