r/javascript • • Sep 22 '17

Essential Vanilla JavaScript Functions

https://dev.to/amit_merchant/essential-vanilla-javascript-functions
0 Upvotes

19 comments sorted by

View all comments

3

u/HairyBeastMan Sep 22 '17

Interesting, an article about essential vanilla js functions that everyone needs. I makes me almost wish...that...maybe someone had written something like this already and packaged a bunch of these up into a single usable library. Maybe gone as far as to name it something clever, perhaps after a piece of punctuation...like say lodash, or underscore or underdash.

Something like that.

1

u/calligraphic-io Sep 23 '17

No need for all that overhead. We have packages for each of OP's functions already, just pull in what you need: str_pad() => npm install pad, etc.

1

u/inu-no-policemen Sep 24 '17

ES2017 added padStart and padEnd.

1

u/calligraphic-io Sep 24 '17

Thanks! I missed that :)