DEV Community

Cover image for Which String methods you wish JavaScript API had?
JoelBonetR πŸ₯‡
JoelBonetR πŸ₯‡

Posted on

Which String methods you wish JavaScript API had?

Cover image credits: tutsmake.com
Those sort of functions/methods you usually copy-paste from a project to another in a utils.js file πŸ˜‚

i.e. we have toLowerCase, toUpperCase but not capitalize or toCamelCase or toPascalCase

undefined is not a function meme

Share your string utils!

Top comments (1)

Collapse
 
thi3rry profile image
Thierry Poinot • Edited

I usually have str_pad from locutus lib (previously phpjs) that I use to log things in nodejs console without other lib requirements : locutus.io/php/strings/str_pad/ind...