Node.js examples for String:Length
Truncate String by length
String.prototype.truncate = function(length) { return this.substr(0, length - 1) + (this.length > length? '...' : ''); }