Re:New ES2019 JavaScript features
by Bjartr on Thursday September 26, 2019 @07:08PM
(#21086599)
Wait, trimLeft/trimRight has different semantics from trimStart/trimEnd in RTL languages. So it has to be more than a simple alias, right?
[ Parent
| on HN ]
I checked on MDN:
"The trimStart() method removes whitespace from the beginning of a string. trimLeft() is an alias of this method."
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
I suspect that trimLeft was misnamed, since its "left" didn't take into account RTL - it just meant start of string.