News for hackers. Stuff that matters.
Re:We now consider Moment.js to be a legacy project in maint... by turdnagel on Tuesday September 15, 2020 @09:42AM (#24481078)
Basically, unexpected behavior. One of the "footguns" is that it's easy to write to a Moment object when you mean to be reading from it. And by the way, you can mutate objects declared with `const` in JS - you just can't reassign them.
Re:We now consider Moment.js to be a legacy project in maint... by holtalanm on Tuesday September 15, 2020 @09:54AM (#24481204)
I don't view the mutability of moment as a complete show stopper, though. If you limit the surface area of the mutability by hiding the underlying moment object within an abstraction, then you can at the very least keep the chances of misusing moment to a minimum.
Re:We now consider Moment.js to be a legacy project in maint... by turdnagel on Tuesday September 15, 2020 @10:40AM (#24481696)
I also think it's not a showstopper for Node.js apps. For bundling in a front-end app it's waaaay too big.
Re:We now consider Moment.js to be a legacy project in maint... by hajile on Tuesday September 15, 2020 @04:00PM (#24486048)
The moment locales webpack plugin goes a very long way toward dealing with the size downside of the library.

That said, we wouldn't be in this position if more companies used a shared CDN for libraries instead of always bundling them.

Re:We now consider Moment.js to be a legacy project in maint... by jbboehr on Tuesday September 15, 2020 @09:17PM (#24488597)
> shared CDN

That helps with transfer but clients still have to parse and execute the javascript which can be significant, especially on mobile devices.