nfp_sites/nfp_moe/app/polyfill.js
2022-08-02 08:00:57 +00:00

8 lines
270 B
JavaScript

if (!String.prototype.endsWith) {
String.prototype.endsWith = function(search, this_len) {
if (this_len === undefined || this_len > this.length) {
this_len = this.length;
}
return this.substring(this_len - search.length, this_len) === search;
};
}