Node.js based forum software built for the modern web
refactor: remove startsWith/endsWith
Barış Soner Uşaklı48bc23c065c1
diff --git a/public/src/utils.js b/public/src/utils.jsindex ea43181139..56b4c46573 100644--- a/public/src/utils.js+++ b/public/src/utils.js@@ -769,27 +769,5 @@},};- /* eslint "no-extend-native": "off" */- if (typeof String.prototype.startsWith !== 'function') {- String.prototype.startsWith = function (prefix) {- if (this.length < prefix.length) {- return false;- }- return this.slice(0, prefix.length) === prefix;- };- }-- if (typeof String.prototype.endsWith !== 'function') {- String.prototype.endsWith = function (suffix) {- if (this.length < suffix.length) {- return false;- }- if (suffix.length === 0) {- return true;- }- return this.slice(-suffix.length) === suffix;- };- }-return utils;}));