Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // extrapolate.js
- String.prototype.extrapolate = function() {
- var str = this;
- this.match(/#\{(.+?)\}/g).forEach(function(each) {
- str = str.replace(each, eval(each.slice(2, -1)));
- });
- return str.valueOf();
- };
Advertisement
Add Comment
Please, Sign In to add comment