3 ms·
But we still have trimLeft() and trimRight() and in true JS tradition we need some more redundancy for symmetry's sake.
by soulofmischief 7y ago
But we still have trimLeft() and trimRight() and in true JS tradition we need some more redundancy for symmetry's sake.
- deleted 7y ago[deleted]
- STRML 7y agoAs 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.
- soulofmischief 7y agoYou're right, I was just being tongue-in-cheek.
- ZenPsycho 7y agoThat makes sense, "left" trimming rtl text could be confusing.