source: trip-planner-front/node_modules/babel-plugin-polyfill-corejs2/lib/add-platform-specific-polyfills.js@ 188ee53

Last change on this file since 188ee53 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 915 bytes
Line 
1"use strict";
2
3exports.__esModule = true;
4exports.default = _default;
5
6function _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); }
7
8const webPolyfills = {
9 "web.timers": {},
10 "web.immediate": {},
11 "web.dom.iterable": {}
12};
13const purePolyfills = {
14 "es6.parse-float": {},
15 "es6.parse-int": {},
16 "es7.string.at": {}
17};
18
19function _default(targets, method, polyfills) {
20 const targetNames = Object.keys(targets);
21 const isAnyTarget = !targetNames.length;
22 const isWebTarget = targetNames.some(name => name !== "node");
23 return _extends({}, polyfills, method === "usage-pure" ? purePolyfills : null, isAnyTarget || isWebTarget ? webPolyfills : null);
24}
Note: See TracBrowser for help on using the repository browser.