Stop Using The uuid Library In JavaScript

preview_player
Показать описание
🌎 Find Me Here:

#Shorts
Рекомендации по теме
Комментарии
Автор

Thanks! Always happy to replace an external dependency by something built in 👌

tubi
Автор

Just something to be aware of, since it's a method that exists on the browser (not nodejs/server), in case you're programming a library made with react (for instance) frameworks like nextjs will have to dynamic import your components, (unless you handle the method execute with useEffect on the library).

joseluisperez
Автор

I love how I just see this in my recommendations after scaffolding out an endpoint needing uuid/guid 😂. Will try it out when I get around to rebuilding my frontend. Keep up the awesome work and merry Christmas to you good sir!

youugotssponged
Автор

I literally spent an hour this morning putting UUID into all my local JSON files and then took a break to youtube and of course this came up first :)

ToddDunning
Автор

This will come very handy for me in the future.
Thanks Kyle once again!

theisoj
Автор

Hey Kyle, you seem to be ill, get well soon. And thanks for the video!

salixar
Автор

Please do a more in depth video exploring the crypto api! 🙏

ofeenee
Автор

I installed it yesterday and will uninstall it today. 👍

abhishekpratap
Автор

Ok, but this only works in browser environments. For Node, Deno, etc. we need an external lib, or (if possible) a built-in alternative

Rudxain
Автор

Watched this a while back but dug it out again so I can ditch UUID from my packages. Thank u pal! Love your channel and your videos! Keep up the great work!

porroapp
Автор

We can generate a random number with the current time in milliseconds plus any extra info and it'll do the trick too.

As someone already said, is always good to replace external libs that do simple things with built-in or handcrafted code.

rodrigoronin_
Автор

wow this is crazy, I don't know such a thing like this exist on built-in js function. Thanks Kyle.

princesiachin
Автор

THIS IS INSANE!! Thanks a lot for this!

codyrap
Автор

I suggest sticking it to the UUID, as crypto requires secured context (HTTPS), which most apps are not.

tryagain
Автор

very valuable info Kyle! you're always killing it man🤯🔥

eip
Автор

This short videos is ideal to get more knowledge about JS. Thanks Kyle for sharing.

HansjeVdTillaert
Автор

I like to use the package along with the native random bytes method when generating random keys with unique IDs. I prefer the options provided by the package vs the options provided by the native implementation. I would also guess that this makes the key more random overall, but that doesn't really matter.
I still gave the video a like, since it was informative and interesting.

jesse
Автор

Thanks Kyle, I was badly in need for it

amankumarbairagi
Автор

Man keep it up. U do such a good work m8 :D

agonyman
Автор

You're forgetting that uuid's have multiple versions (v1..5). Also the npm module comes with useful functions, e.g. validate(), version().

I completely agree with native solutions, but often they're lacking features.

accidentalengineering