api-def 0.7.2 → 0.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/Utils.js +3 -0
- package/esm/Utils.js +3 -0
- package/package.json +1 -1
package/cjs/Utils.js
CHANGED
|
@@ -29,6 +29,9 @@ var padNumber = function (stringOrNumber, maxLength) {
|
|
|
29
29
|
};
|
|
30
30
|
exports.padNumber = padNumber;
|
|
31
31
|
var getGlobalFetch = function () {
|
|
32
|
+
if (typeof global !== "undefined" && typeof global.fetch === "function") {
|
|
33
|
+
return global.fetch;
|
|
34
|
+
}
|
|
32
35
|
if (typeof window === "undefined") {
|
|
33
36
|
return undefined;
|
|
34
37
|
}
|
package/esm/Utils.js
CHANGED
|
@@ -25,6 +25,9 @@ export var padNumber = function (stringOrNumber, maxLength) {
|
|
|
25
25
|
: "0".repeat(maxLength - string.length) + string;
|
|
26
26
|
};
|
|
27
27
|
export var getGlobalFetch = function () {
|
|
28
|
+
if (typeof global !== "undefined" && typeof global.fetch === "function") {
|
|
29
|
+
return global.fetch;
|
|
30
|
+
}
|
|
28
31
|
if (typeof window === "undefined") {
|
|
29
32
|
return undefined;
|
|
30
33
|
}
|