@graphql-mesh/utils 0.43.5 → 0.43.6-alpha-20230125223855-e21cdbd20
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/getHeadersObj.js
CHANGED
|
@@ -8,8 +8,11 @@ function headersToJSON(headers) {
|
|
|
8
8
|
});
|
|
9
9
|
return obj;
|
|
10
10
|
}
|
|
11
|
+
function isHeaders(headers) {
|
|
12
|
+
return headers != null && 'forEach' in headers;
|
|
13
|
+
}
|
|
11
14
|
function getHeadersObj(headers) {
|
|
12
|
-
if (
|
|
15
|
+
if (!isHeaders(headers)) {
|
|
13
16
|
return headers;
|
|
14
17
|
}
|
|
15
18
|
return new Proxy({}, {
|
package/esm/getHeadersObj.js
CHANGED
|
@@ -5,8 +5,11 @@ function headersToJSON(headers) {
|
|
|
5
5
|
});
|
|
6
6
|
return obj;
|
|
7
7
|
}
|
|
8
|
+
function isHeaders(headers) {
|
|
9
|
+
return headers != null && 'forEach' in headers;
|
|
10
|
+
}
|
|
8
11
|
export function getHeadersObj(headers) {
|
|
9
|
-
if (
|
|
12
|
+
if (!isHeaders(headers)) {
|
|
10
13
|
return headers;
|
|
11
14
|
}
|
|
12
15
|
return new Proxy({}, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-mesh/utils",
|
|
3
|
-
"version": "0.43.
|
|
3
|
+
"version": "0.43.6-alpha-20230125223855-e21cdbd20",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"graphql": "*"
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"@graphql-mesh/cross-helpers": "0.3.1",
|
|
10
10
|
"@graphql-mesh/string-interpolation": "0.4.2",
|
|
11
|
-
"@graphql-mesh/types": "0.89.
|
|
11
|
+
"@graphql-mesh/types": "0.89.5-alpha-20230125223855-e21cdbd20",
|
|
12
12
|
"@graphql-tools/delegate": "9.0.22",
|
|
13
13
|
"@graphql-tools/utils": "9.1.4",
|
|
14
14
|
"js-yaml": "4.1.0",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function getHeadersObj(headers:
|
|
1
|
+
export declare function getHeadersObj(headers: HeadersInit): Record<string, string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function getHeadersObj(headers:
|
|
1
|
+
export declare function getHeadersObj(headers: HeadersInit): Record<string, string>;
|