Skip to content

Commit

Permalink
refactor: remove lodash.concat as a dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
anonrig committed Jun 14, 2021
1 parent 7d29bea commit a3bb115
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 18 deletions.
4 changes: 2 additions & 2 deletions lib/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ class Mali extends Emitter {
// we have a matching service
// lets add service-level middleware to that service
const sd = this.data[serviceName]
sd.middleware = _.concat(sd.middleware, fns)
sd.middleware = sd.middleware.concat(fns)

return
} else {
Expand Down Expand Up @@ -290,7 +290,7 @@ class Mali extends Emitter {
throw new Error(`Handler for ${name} already defined for service ${serviceName}`)
}

sd.handlers[methodName] = _.concat(sd.middleware, fns)
sd.handlers[methodName] = sd.middleware.concat(fns)
}
}

Expand Down
2 changes: 0 additions & 2 deletions lib/lo.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
const forOwn = require('lodash.forown')
const concat = require('lodash.concat')
const isPlainObject = require('lodash.isplainobject')
const pull = require('lodash.pull')
const pick = require('lodash.pick')
const camelCase = require('lodash.camelcase')

module.exports = {
forOwn,
concat,
isPlainObject,
pull,
pick,
Expand Down
13 changes: 1 addition & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
"destroy": "^1.0.4",
"ee-first": "^1.1.1",
"lodash.camelcase": "^4.3.0",
"lodash.concat": "^4.5.0",
"lodash.forown": "^4.4.0",
"lodash.isplainobject": "^4.0.6",
"lodash.pick": "^4.4.0",
Expand All @@ -59,7 +58,7 @@
},
"devDependencies": {
"@grpc/grpc-js": "^1.3.2",
"@grpc/proto-loader": "^0.6.1",
"@grpc/proto-loader": "^0.6.2",
"async": "^3.2.0",
"ava": "^3.15.0",
"benchmarkify": "^2.1.3",
Expand Down

0 comments on commit a3bb115

Please sign in to comment.