1 | "use strict";
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | Object.defineProperty(exports, "__esModule", { value: true });
|
9 | exports.validatePolyFilling = void 0;
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 | var validatePolyFilling = function () {
|
17 | if (typeof Promise === "undefined" && typeof fetch === "undefined") {
|
18 | var error = new Error("Library cannot function without Promise and fetch. So, please provide polyfill for them.");
|
19 | error.name = "PolyFillNotAvailable";
|
20 | throw error;
|
21 | }
|
22 | else if (typeof Promise === "undefined") {
|
23 | var error = new Error("Library cannot function without Promise. So, please provide polyfill for it.");
|
24 | error.name = "PolyFillNotAvailable";
|
25 | throw error;
|
26 | }
|
27 | else if (typeof fetch === "undefined") {
|
28 | var error = new Error("Library cannot function without fetch. So, please provide polyfill for it.");
|
29 | error.name = "PolyFillNotAvailable";
|
30 | throw error;
|
31 | }
|
32 | return true;
|
33 | };
|
34 | exports.validatePolyFilling = validatePolyFilling;
|
35 |
|
\ | No newline at end of file |