Fast and light relative time strings in JS

preview_player
Показать описание

#javascript #performance #webdev #js
Рекомендации по теме
Комментарии
Автор

It's pretty incredible how co-pilot can be used to make this kind of demo so seamless

AZombieHippie
Автор

btw moment developers suggest using luxon instead

soniablanche
Автор

Hey man! Great video, I really like the short, sweet, but dense knowledge transfer with a bit of entertainment mixed in.

Can you tell me the name of the plugin you have, which outputs the code in comments?

webdevgaur
Автор

I used to use moment for date formatting. (Added 61kb)
Then I switched to day.js. (Removed 56kb, Bundle Size = 5kb)
After this video, I dropped both of them. (Removed 4.572kb, Bundle Size = 428b)
And with Next 13, It doesn't even matter. (Removed 428b, Bundle Size = 0kb)

Dev-Siri
Автор

I thought you were replacing the library with just Intl... not that then you needed a function with 20 lines of code for a single thing. It's better to use a library (not moment) that can solve every date problem you have on your app rather than have multiple 20 line functions on an utils file.

airixxxx
Автор

Could u tell me What's the name of the extension that gives u the size of the imports ?

Light-nnhn