I originally blogged about this on my other site lazygnome.net but that was simply a quick place to record it. I present to you a very quick and handy way of replicating PHP’s trim() function in JS: function ws_trim(value) { return value.replace(/(^\s+|\s+$)/g, ”); } There it is, simple and usable. I don’t claim to [...]

