From 48bc23c065c1d63b93de3429135ea55970c48483 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Thu, 4 Mar 2021 13:18:29 -0500 Subject: [PATCH] refactor: remove startsWith/endsWith --- public/src/utils.js | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/public/src/utils.js b/public/src/utils.js index 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; }));