Skip to content
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

use lodash find() instead of Array.prototype.find #1533

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/file-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ List.prototype._isExcluded = function (path) {
//
// Returns the match or `undefined` if none found.
List.prototype._isIncluded = function (path) {
return this._patterns.find(function (pattern) {
return _.find(this._patterns, function (pattern) {
return mm(path, pattern.pattern)
})
}
Expand Down Expand Up @@ -133,7 +133,7 @@ List.prototype._exists = function (path) {
return mm(path, pattern.pattern)
})

return !!patterns.find(function (pattern) {
return !!_.find(patterns, function (pattern) {
return self._findFile(path, pattern)
})
}
Expand Down