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; - } - }); - } -});