Re:What’s New in ES2019
by soulofmischief on Tuesday July 30, 2019 @09:54AM
(#20564852)
But we still have trimLeft() and trimRight() and in true JS tradition we need some more redundancy for symmetry's sake.
[ Parent
| on HN ]
As in the MDN article:
All major engines have also implemented corresponding trimLeft and trimRight functions - without any standard specification.
So ES2019 implements trimStart() and trimEnd(), which are symmetrical to padStart() and padEnd(), but trimLeft() and trimRight() aliases are maintained as not to break working code.That makes sense, "left" trimming rtl text could be confusing.
Re:What’s New in ES2019
by soulofmischief on Thursday August 01, 2019 @10:42AM
(#20584095)
You're right, I was just being tongue-in-cheek.