SwitchbladeBot / switchblade

The open source Discord bot that solves all of your problems.
https://switchblade.xyz/
BSD 4-Clause "Original" or "Old" License
424 stars 224 forks source link

Remove lodash dependency and usage #1338

Closed GuyKh closed 2 years ago

GuyKh commented 2 years ago

Closes #1128

Used this to replace the _.isEqual() -- Please look at it's limitations. I think it's OK. https://www.samanthaming.com/tidbits/33-how-to-compare-2-objects/#es6-way-for-comparing-2-objects

metehus commented 2 years ago

Could you also remove from the package.json file? Edit: sorry, just read your comment

metehus commented 2 years ago

@fernando457829 did that, could you explain better? my teory is to merge the methods into a function, like, ['red', 'bold'] -> chalk.red.bold(), like you said, but also supporting strings(colors), not only booleans

fersilva16 commented 2 years ago

@fernando457829 did that, could you explain better? my teory is to merge the methods into a function, like, ['red', 'bold'] -> chalk.red.bold(), like you said, but also supporting strings(colors), not only booleans

Yep, this was the idea when I created that, but it's broken from the beginning. It's better to remove chalk and this functions too, maybe adding a logger like pinojs, bunyan or signale, probably I will create a PR changing it.

GuyKh commented 2 years ago

@fernando457829 - trying to keep the scope limited by removing loadash as part of this PR. What would you suggest me to do?

GuyKh commented 2 years ago

Could you also remove from the package.json file? Edit: sorry, just read your comment

Done

fersilva16 commented 2 years ago

@fernando457829 - trying to keep the scope limited by removing loadash as part of this PR. What would you suggest me to do?

I only removed log and logError, it'll be merged soon!

almeidx commented 2 years ago

This needs a rebase

GuyKh commented 2 years ago

@almeidx - resolved the conflicts