DEV Community

Cover image for 37 JavaScript Utility Functions for String, Object, Array & Date

37 JavaScript Utility Functions for String, Object, Array & Date

Syakir on July 29, 2024

Checkout the original post to read with Table of Contents Learn React with The Complete React Bootcamp only for $49 a year (Free 1 month trial) *a...
Collapse
 
duendeintemporal profile image
duendeintemporal

Your use of RegExp was instructive, thanks for the post

Collapse
 
syakirurahman profile image
Syakir

Glad if you find it helpful

Collapse
 
nutch profile image
Nicholas Hutchind

What do you see as the benefit in offering utility functions that simply wrap an extremely similar native method? Like trim(), padStart(), padEnd(), etc

Collapse
 
syakirurahman profile image
Syakir

Just to switch them to a more convinient invocation, like other utils.
But i guess you're right, not much benefit.. i will change them with other utils..
Thanks for pointing it out

Collapse
 
eatsnacks profile image
As unknow

If there are functions in the object, is deep copy a bit inappropriate

Collapse
 
syakirurahman profile image
Syakir

Yes, i know, thats why i recommend to read The Right Way to Clone Nested Object/Array in Javascript for more advanced use cases.

Collapse
 
eatsnacks profile image
As unknow

😄Sorry, I just realized

Collapse
 
gritty_dev profile image
Eugene Chiu

Nice post

Collapse
 
syakirurahman profile image
Syakir

Thank you 🙂

Collapse
 
joaozitopolo profile image
Joao Polo

awesome and useful article. Congrats!

Collapse
 
syakirurahman profile image
Syakir

Thank you!