YuriGor / deepdash

eachDeep, filterDeep, findDeep, someDeep, omitDeep, pickDeep, keysDeep etc.. Tree traversal library written in Underscore/Lodash fashion
https://deepdash.io/
MIT License
274 stars 12 forks source link

Remove Lodash dependency. #59

Closed simlu closed 4 years ago

simlu commented 4 years ago

Your require syntax seems weird. Is there a reason that lodash is not a peer dependency?

YuriGor commented 4 years ago

I support two versions of lib:

YuriGor commented 4 years ago

Well, I read about peer deps, and I think it's not a deepdash case. Lodash is heavily used internally, so it's a 'normal' dependency. Depending on build type:

I have a dream to replace all the Lodash dependencies in the standalone version by native/self-written alternatives. It's especially desired because of #58 After that, I will be able to switch Lodash from deps to peer deps.

Also, it would be good to support also Underscore.js - it still has some good audience, so maybe folks will appreciate Deepdash too. But in this case, I am not sure if I will need to list both Lodash and Underscore as peer deps, because they are alternatives to each other.

YuriGor commented 4 years ago

Well, I had several attempts of doing this, and the heaviest thing I found is the clone / cloneDeep method deepdash depends on in filterDeep. But these attempts made me to learn the core problem deeper so now I am about of great refactoring of filterDeep.