From 81c3578adcbf17bc5be366be479f53f537f18246 Mon Sep 17 00:00:00 2001 From: Anderson Vasques Date: Fri, 20 Jan 2017 01:32:16 -0200 Subject: [PATCH] [7.0] Remove old code used for backwards compatibility (#5122) [7.0] Remove old code used for backwards compatibility in babel-polyfill Fixes #5121 --- packages/babel-polyfill/src/index.js | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/packages/babel-polyfill/src/index.js b/packages/babel-polyfill/src/index.js index 2dfde7b6d7..cff406dbbf 100644 --- a/packages/babel-polyfill/src/index.js +++ b/packages/babel-polyfill/src/index.js @@ -7,23 +7,3 @@ global._babelPolyfill = true; import "core-js/shim"; import "regenerator-runtime/runtime"; - -// Should be removed in the next major release: - -import "core-js/fn/regexp/escape"; - -const DEFINE_PROPERTY = "defineProperty"; -function define(O, key, value) { - O[key] || Object[DEFINE_PROPERTY](O, key, { - writable: true, - configurable: true, - value: value - }); -} - -define(String.prototype, "padLeft", "".padStart); -define(String.prototype, "padRight", "".padEnd); - -"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function(key) { - [][key] && define(Array, key, Function.call.bind([][key])); -});