From 3de5317d1856fe0fa0886b0c1b2835fa556b8b31 Mon Sep 17 00:00:00 2001 From: Jenny Schweers Date: Wed, 23 Oct 2024 15:20:12 -0400 Subject: [PATCH] Removed polyfills file --- src/main.js | 1 - src/polyfills.js | 29 ----------------------------- 2 files changed, 30 deletions(-) delete mode 100644 src/polyfills.js diff --git a/src/main.js b/src/main.js index 5ae63804a..bfd2dcb35 100644 --- a/src/main.js +++ b/src/main.js @@ -154,7 +154,6 @@ define([ 'vellum/saveToCase', 'vellum/uploader', 'vellum/window', - 'vellum/polyfills', 'vellum/copy-paste', 'vellum/commander', 'vellum/commcareConnect', diff --git a/src/polyfills.js b/src/polyfills.js deleted file mode 100644 index 12e400a5e..000000000 --- a/src/polyfills.js +++ /dev/null @@ -1,29 +0,0 @@ -define(function () { - if (!String.prototype.startsWith) { - Object.defineProperty(String.prototype, 'startsWith', { - enumerable: false, - configurable: false, - writable: false, - value: function(searchString, position) { - position = position || 0; - return this.lastIndexOf(searchString, position) === position; - } - }); - } - if (!String.prototype.endsWith) { - Object.defineProperty(String.prototype, 'endsWith', { - enumerable: false, - configurable: false, - writable: false, - value: function(searchString, position) { - var subjectString = this.toString(); - if (typeof position !== 'number' || !isFinite(position) || Math.floor(position) !== position || position > subjectString.length) { - position = subjectString.length; - } - position -= searchString.length; - var lastIndex = subjectString.indexOf(searchString, position); - return lastIndex !== -1 && lastIndex === position; - } - }); - } -});