Urara-Blog/node_modules/.pnpm-store/v3/files/3b/6678dbd7b1d482689a57e8160442b9f816c42e23acbbae7273c008d4a33ea3dcf645dfdb31951fba73bb745197261d13b1373391dd2bcfdb7ff44665866dbb
2022-08-14 01:14:53 +08:00

24 lines
No EOL
915 B
Text

"use strict";
exports.__esModule = true;
exports.default = _default;
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
const webPolyfills = {
"web.timers": {},
"web.immediate": {},
"web.dom.iterable": {}
};
const purePolyfills = {
"es6.parse-float": {},
"es6.parse-int": {},
"es7.string.at": {}
};
function _default(targets, method, polyfills) {
const targetNames = Object.keys(targets);
const isAnyTarget = !targetNames.length;
const isWebTarget = targetNames.some(name => name !== "node");
return _extends({}, polyfills, method === "usage-pure" ? purePolyfills : null, isAnyTarget || isWebTarget ? webPolyfills : null);
}