String#trim(chars)
Cyril Auburtin
cyril.auburtin at gmail.com
Sat Apr 22 13:41:55 UTC 2017
Like some other languages (ex: python .strip, postgresql trim, ..) I think
it would really useful that `String.prototype.trim` accept a string
argument representing the characters to trim (or possible a regex).
And keep it's default behavior if no argument is passed
```js
'\t Test \n\n'.trim(' \t\n') == 'Test'
```
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20170422/43b22b97/attachment.html>
More information about the es-discuss
mailing list