jonsamp / date-streaks

Find a variety of streak metrics from a list of dates
MIT License
49 stars 7 forks source link

Replace moment.js #2

Closed ngehlert closed 5 years ago

ngehlert commented 5 years ago

Are you willing to accept a PR to remove moment() as dependency and use something more lightweigt?

Or instead a PR to at least only import the needed functions from moment instead of the entire lib?

jonsamp commented 5 years ago

Yes, this is a great improvement idea and one im working on right now. I'm going to convert this lib to use date-fns. If you have another lib in mind, let me know. But this one seems popular and vastly smaller and faster than moment.

ngehlert commented 5 years ago

sounds awesome. yes I would've chosen date-fns as well. let me know if you need any help :)

jonsamp commented 5 years ago

I just published a new version that replaces moment with date-fns 🎉

You can see the entire PR here if you're interested: https://github.com/jonsamp/date-streaks/pull/4

Also, here's a graph showing the size decrease after conversion. Great improvement!

Screen Shot 2019-05-10 at 9 44 50 PM

... Now on to adding a an index.d.ts

ngehlert commented 5 years ago

you are awesome. thanks for your work