extender – string [ 1073 views ]
Goal: give some additional function to the String type
// 1. repeat n-times - '<div />'.repeat(4) -> "<div /><div /><div /><div />"
TypeExtend(String, 'repeat', function(n) { return new Array(n + 1).join(this); });
// 2. find string in other
TypeExtend(String, 'contains', function(s) { return !!~this.indexOf(s); });


