Javascript: Trim whitespace

At developer.irt.org are two functions (same project as below) to trim whitespace around a string. (In php you have the handy function trim() - but in javascript I don’t think there’ anything that’s “pre-made”)

(There’s a few other’s floating around the web too. planet-source, breaking-par - there’s more if you search in google)

One Response to “Javascript: Trim whitespace”

  1. Jennifer Says:

    note to self - the function listed at breaking par worked better for me…