asciinema.org/app/assets/javascripts/misc.js
2011-11-21 23:17:11 +01:00

11 lines
235 B
JavaScript

Function.prototype.bind = function(object) {
var func = this;
return function() {
return func.apply(object, arguments);
};
};
String.prototype.times = function(n) {
return Array.prototype.join.call({length:n+1}, this);
};