Generally `trim()` will only operate on the start and end of the strings (also why `trimLeft()` and `trimRight()`.
All that needs to be done is allow specifying a string or array of characters to trim as an argument – which should not break anything as the `trim()` method currently accepts nothing. If nothing specified, use [\r, \n, \t, ‘ ‘] – or whatever it currently does as to once again not break anything. As a sidenote; traditionally `trim` will use text transforms first from the start, and then from the end of the string. I’m not sure in JS if a regex is faster, or if it even matters overall. -Michael
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

