jsreport / jsreport-core

The minimalist jsreport rendering core
GNU Lesser General Public License v3.0
85 stars 24 forks source link

Consider replacing underscore with lodash #16

Closed dlong500 closed 6 years ago

dlong500 commented 7 years ago

It would be nice if the underscore dependency could be dropped in favor of lodash (or possibly even just removed altogether and replaced with native functions).

IMO a lodash dependency is acceptable because so many other projects depend on it (and it is far more modular). While underscore was of course the original, lodash has more than 3 times the download frequency on npm (and contains more features). The issue I'm having is that I'm having to bundle BOTH of them because of dependencies of modules I'm using, and while a dozen or so of the modules require lodash, jsreport-core is the only module I'm using that is pulling in underscore.

Not a huge deal, but given how easy of a switch it is I thought I'd ask. If you are OK with it I could file a PR.

bjrmatos commented 7 years ago

hi! i don't see any major downside about switching to lodash, i also think that lodash is the clear winner between the two projects, so i think that a PR for this is very welcome, just make sure that every underscore method used has the proper equivalency in lodash

bjrmatos commented 6 years ago

in next version v2 we are no longer using underscore methods (thanks to new ES features)