Node.js examples for String:Trim
Trim a string via regex
function trim(s) { return s.replace( /^\s+|\s+$/g, "" ); }