main
Last change
on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 2 weeks ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
934 bytes
|
Line | |
---|
1 | "use strict";
|
---|
2 |
|
---|
3 | exports.__esModule = true;
|
---|
4 | exports.default = _default;
|
---|
5 | function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
---|
6 | const webPolyfills = {
|
---|
7 | "web.timers": {},
|
---|
8 | "web.immediate": {},
|
---|
9 | "web.dom.iterable": {}
|
---|
10 | };
|
---|
11 | const purePolyfills = {
|
---|
12 | "es6.parse-float": {},
|
---|
13 | "es6.parse-int": {},
|
---|
14 | "es7.string.at": {}
|
---|
15 | };
|
---|
16 | function _default(targets, method, polyfills) {
|
---|
17 | const targetNames = Object.keys(targets);
|
---|
18 | const isAnyTarget = !targetNames.length;
|
---|
19 | const isWebTarget = targetNames.some(name => name !== "node");
|
---|
20 | return _extends({}, polyfills, method === "usage-pure" ? purePolyfills : null, isAnyTarget || isWebTarget ? webPolyfills : null);
|
---|
21 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.