Hacker News new | ask | show | jobs
by spdionis 3708 days ago
> String.prototype.padStart() / String.prototype.padEnd()

Finally left-pad module's functionality will be integrated into core! Souns awesome. /s

2 comments

I would really like if Unicode properties were implemented. I'd also like to see a RegExp escape function. String padding sees common enough usage that it should be added.
Unicode properties are behind an experimental flag: --harmony-regexp-property
Good to know!
I do support the addition. It's an useful feature. Just couldn't stop myself :).
the whole reason left pad was such a big deal is because of padStart.

People writing polyfil's to add padStart to String.prototype used left-pad.