Stop Wasting Your Time - Use These 16 JS Utility Functions Instead

preview_player
Показать описание
I have made tons of videos on small, useful React custom hooks, but I have never covered any useful JavaScript utilities. That changes today. In this video I cover 16 amazing utility functions in JavaScript that span across 3 major categories. These functions will make working with the DOM, arrays, formatting, and more even easier.

📚 Materials/References:

🌎 Find Me Here:

⏱️ Timestamps:

00:00 - Introduction
00:38 - DOM Utilities
06:15 - Other Utilities
08:53 - Array Utilities
11:30 - Formatters

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

Kyle. At this point I cannot live without your videos. Please never stop. Love from Ghana. ❤️‍🔥🇬🇭

iamthe_OBSERVER
Автор

Kyle, great subject. I was worried that it would be one of those "include this now-CVE'd NPM library". Having your own utilities is something some programmers fail utilize nowadays. (Nothing wrong with NPM as a whole, but it has its caveats). Now more importantly, you have a good presentation style, and even though you speak rapidly (this is a plus), your speech is quite clear and understandable. I'm always interested in the content you create, and even if I don't find it useful or maybe is old hack for me I don't feel like I've wasted time hearing what you have to say (in general I usually find I learn something new or at least something new to think about). Keep up the great work.

TheDeathMongrel
Автор

Thanks to your javascript tutorials I learned how to access all of your video files from your website, so now I can watch them for free and I also uploaded them on torrent so everyone is happy ^^

SorakaOTP
Автор

You shouldn't be using filter() for the first()/last() methods. It becomes exponentially slower as the array grows in size.
slice(0, n)/slice(-n) are much more efficient and show no significant degradation in performance with larger arrays.

filipusfontanus
Автор

The formatter part is amazing! Thanks.

bushigi
Автор

You are just doing an amazing job man. thanks for sharing your knowledge with the community. I really appreciate you from the bottom of my heart. Thanks a lot.

mrahamed
Автор

Awesome video and great advice. Just as every good chef maintains their personal set of knives, every good programmer should have their personal arsenal of general-use utility functions. Your “bag of tricks” should follow you in your travels as a developer and evolve/improve with repeated use across multiple projects. This has the added benefit of making your work more consistent and therefore easier to maintain over time. Nice work, Kyle!

robertholtz
Автор

Man your content is amazing. Been working on a vaniila js project and I have so many utility functions as esm, they are so handy. About to modify some of them to use yours 😂 and add the rest to my huge util.js file. Thanks man. Amazing work.

senseicodes
Автор

If you're still working with a framework which directly manipulates DOM. Chances are it's JQuery which has easier selector and a much larger feature/function set

RedVelocityTV
Автор

RelativeDateFormat is exaclty what I was looking for and what I was going to implement by myself. Thanks, you saved me a lot of time.

pepptube
Автор

The number formatter is a life saver. I don't even want to know how many times I've done a replaceAll(".", ", "), because Denmark uses French decimals

bennymeister
Автор

Such quality content! Love your videos!

vaibhavrawat
Автор

You lived up to the name of the channel

LlegoManuel
Автор

Awesome! So helpfull! I changed the createElement function to .className = value (on key === 'class'), so i can pass all classes in one single string

brunocastro
Автор

Superlike! Why did I not see this earlier... Thank you!

romanext
Автор

5:30 😂 The confusion on his face as it fails to work as he's describing it lol

jonathanmarois
Автор

What a coincidence. I just searched for js useful common code snippets yesterday. I need a function that picked a random number min~max, random item in array, delay promise, etc.

The ones I always have are the shortcut to get element by id and selectors. I need your createElement and addGlobalEventListener now. 😁

agent-
Автор

array.at(-1) can be used instead of array[array.length - 1]

thevividversatilechannel
Автор

Amazing video, I love these as a junior ♥️

Niksorus
Автор

This is sooo useful, just like CSS we create utilities for less repetition. 🙌

loydcose