Node.js examples for String:Trim
Trim string and check null
String.prototype.trim = function() { if (this == void 0) {throw new Error("Illegal argument error.");} return this.replace(/(^\s+)|(\s+$)/g, ""); }