JavaScript
String.prototype.trim = function() { return this.replace( /^\s*(\S*(\s+\S+)*)\s*$/, "$1"); }'---' + ' hello there '.trim() + '---'
String.prototype.supplant = function (o){ return this.replace(/{([^{}]*)}/g, function (a,b) { return o[b]; } ); }; var template = '<table border="{border}"' + '<tr><th>Last</th><td>{last}</td></tr>' + '<tr><th>First</th><td>{first}</td></tr>' + '</table>'; var data = { first: "Carl", last: "Hollywood", border: 2 };template.supplant(data)
Object.prototype
Array.prototype
Function.prototype
Number.prototype
String.prototype
Boolean.prototype
57 of 65