Dmitry Soshnikov dmitry.soshnikov at
Mon Mar 16 22:22:10 UTC 2015


Just got a question why don't we polyfill `trimLeft` and `trimRight` for
strings, and have only `trim` (and the answer is -- because it's not part
of ES5/ES6).

Just thinking could it be a valid cases when a dev may want to trim only
form right still keeping e.g. the precalculated padding on the left (seems

MDN mentions them [1], [2], though as non-standard. What stopping both
methods to be included?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list