mirror of
https://github.com/S2-/minifyfromhtml.git
synced 2025-08-03 12:20:04 +02:00
add some packages
This commit is contained in:
28
node_modules/babel-polyfill/lib/index.js
generated
vendored
Normal file
28
node_modules/babel-polyfill/lib/index.js
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
"use strict";
|
||||
|
||||
require("core-js/shim");
|
||||
|
||||
require("regenerator-runtime/runtime");
|
||||
|
||||
require("core-js/fn/regexp/escape");
|
||||
|
||||
if (global._babelPolyfill) {
|
||||
throw new Error("only one instance of babel-polyfill is allowed");
|
||||
}
|
||||
global._babelPolyfill = true;
|
||||
|
||||
var 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]));
|
||||
});
|
Reference in New Issue
Block a user