@webqit/fetch-plus 0.1.21 → 0.1.23
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/dist/main.js +1 -1
- package/dist/main.js.map +3 -3
- package/package.json +3 -3
- package/src/HeadersPlus.js +3 -0
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
],
|
|
12
12
|
"homepage": "https://fetch-plus.netlify.app/",
|
|
13
13
|
"icon": "https://webqit.io/icon.svg",
|
|
14
|
-
"version": "0.1.
|
|
14
|
+
"version": "0.1.23",
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"repository": {
|
|
17
17
|
"type": "git",
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"@webqit/observer": "^3.8.19",
|
|
37
37
|
"@webqit/port-plus": "^0.1.19",
|
|
38
|
-
"@webqit/url-plus": "^0.1.
|
|
38
|
+
"@webqit/url-plus": "^0.1.6"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@webqit/observer": "^3.8.19",
|
|
42
42
|
"@webqit/port-plus": "^0.1.19",
|
|
43
|
-
"@webqit/url-plus": "^0.1.
|
|
43
|
+
"@webqit/url-plus": "^0.1.6",
|
|
44
44
|
"chai": "^4.3.4",
|
|
45
45
|
"chai-as-promised": "^7.1.1",
|
|
46
46
|
"esbuild": "^0.20.2",
|
package/src/HeadersPlus.js
CHANGED
|
@@ -176,8 +176,11 @@ export function renderCookieObjToString(cookieObj) {
|
|
|
176
176
|
const attrsArr = [`${cookieObj.name}=${/*encodeURIComponent*/(cookieObj.value)}`];
|
|
177
177
|
for (const attrName in cookieObj) {
|
|
178
178
|
if (['name', 'value'].includes(attrName)) continue;
|
|
179
|
+
|
|
179
180
|
let _attrName = attrName[0].toUpperCase() + attrName.substring(1);
|
|
180
181
|
if (_attrName === 'MaxAge') { _attrName = 'Max-Age' };
|
|
182
|
+
|
|
183
|
+
if (cookieObj[attrName] === false) continue;
|
|
181
184
|
attrsArr.push(cookieObj[attrName] === true ? _attrName : `${_attrName}=${cookieObj[attrName]}`);
|
|
182
185
|
}
|
|
183
186
|
return attrsArr.join('; ');
|