Pebbling Club 🐧🪨
Welcome!
Signup
Login
Faster JavaScript Trim
blog.stevenlevithan.com
2008-01-31T04:32:20.000Z
javascript
trim
webdev
programming
imported:pinboard
Notes
"After seeing a particularly bad trim implementation, I decided to do a little research towards finding the most efficient approach."
Feed
Embed
Unfurl
{ "failed": true, "failedAt": 1728195597456, "failedError": "TimeoutError: Promise timed out after 10000 milliseconds", "expires": 1728366076017, "status": 200, "bodyLength": 114414, "author": "Steven Levithan", "date": "2024-10-07T05:41:25.074Z", "description": "Since JavaScript doesn’t include a trim method natively, it’s included by countless JavaScript libraries – usually as a global function or appended to String.prototype. However, I’ve never seen an implementation which performs as well as it could, probably because most programmers don’t deeply understand or care about regex efficiency issues. After seeing a particularly bad…", "image": "https://secure.gravatar.com/avatar/38194cd1ec3c543ce6f68317cf6b955c?s=56&d=mm&r=pg", "logo": "https://blog.stevenlevithan.com/favicon.ico", "title": "Faster JavaScript Trim", "url": "https://blog.stevenlevithan.com/archives/faster-trim-javascript", "feed": "https://blog.stevenlevithan.com/feed", "iframe": "
Faster JavaScript Trim
\n", "lang": "en", "duration": 9401 }
0 - 50 of 1 items
10
25
50
100
250
imported:pinboard (29360)
Unread (2255)
needs-tags (2187)
webdev (2006)
funny (1709)
gaming (1562)
ifttt (1352)
googlereader (1291)
politics (1214)
reddit (1090)
github (839)
ttrss (801)
twitter (736)
shared (726)
nifty (687)
scifi (573)
music (562)
imported:opml (535)
osx (526)
javascript (512)
hardware (479)
IFTTT (477)
metablogging (471)
odd (429)
programming (419)