Use lodash individual modules instead of requiring the entire package#102
Use lodash individual modules instead of requiring the entire package#102kyrylo merged 3 commits intoairbrake:masterfrom
Conversation
lib/airbrake.js
Outdated
| } | ||
|
|
||
| _.assign(Airbrake.prototype, EventEmitter.prototype); | ||
| assign(Airbrake.prototype, EventEmitter.prototype); |
There was a problem hiding this comment.
I believe assign is more performant as it doesn't deep merge. I don't really know though, I didn't want to change any of the logic in this PR. You could also use Object.assign(), but that is only available in Node v4 and later.
There was a problem hiding this comment.
I don't think performance really matters here. May I ask you to use only merge, given that we don't use assign anywhere else?
There was a problem hiding this comment.
Sure. I can make the change but I can't say for sure that it wouldn't break something.
|
Looks good, thanks! Could you squash into 1 commit? |
|
I can if you want. Do you know that you can do a one-click squash and merge from github? Just click the arrow next to the merge button below. It's a bit nicer because it maintains the history in the PR. :-) |
|
Just released v1.0.3 with your change. Happy Airbraking! |
I'm using node-airbrake with electron so size is an issue for me. lodash adds 1.3MB to my app so I'm hoping you can use the individual packages instead.