This commit is contained in:
barisusakli
2014-09-06 23:57:51 -04:00
parent cc3786e22d
commit 273db693e7
3 changed files with 25 additions and 0 deletions

View File

@@ -359,6 +359,16 @@
}
};
if (typeof String.prototype.startsWith != 'function') {
String.prototype.startsWith = function (prefix){
if (this.length < prefix.length)
return false;
for (var i = prefix.length - 1; (i >= 0) && (this[i] === prefix[i]); --i)
continue;
return i < 0;
};
}
if ('undefined' !== typeof window) {
window.utils = module.exports;
}