UNPKG

833 BJavaScriptView Raw
1"use strict";
2
3require("core-js/shim");
4
5require("regenerator-runtime/runtime");
6
7require("core-js/fn/regexp/escape");
8
9if (global._babelPolyfill) {
10 throw new Error("only one instance of babel-polyfill is allowed");
11}
12global._babelPolyfill = true;
13
14var DEFINE_PROPERTY = "defineProperty";
15function define(O, key, value) {
16 O[key] || Object[DEFINE_PROPERTY](O, key, {
17 writable: true,
18 configurable: true,
19 value: value
20 });
21}
22
23define(String.prototype, "padLeft", "".padStart);
24define(String.prototype, "padRight", "".padEnd);
25
26"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) {
27 [][key] && define(Array, key, Function.call.bind([][key]));
28});
\No newline at end of file