Hacker News new | ask | show | jobs
by AsusFan 2516 days ago
Seems like a real missed opportunity to look at the Python stdlib and add a bunch of missing functionality to JS so that people don't have to import a metric ton of third party libraries (or worse, write it themselves) to add something you get for free in most other scripting languages.

Even the trim operations they added fall short of the target. In Python (and tcl, by the way) you can specify which characters to trim.

So close, yet, so far.

1 comments

You can use regex for other characters, the point of the trim functions is that they match the somewhat complex unicode whitespace.