@azure-net/kit 5.0.2 → 5.0.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.
@@ -66,4 +66,5 @@ export declare class UniversalCookie {
66
66
  * @returns {void}
67
67
  */
68
68
  static clear(options?: CookieOptions): void;
69
+ static toCredentials(): string;
69
70
  }
@@ -151,4 +151,10 @@ export class UniversalCookie {
151
151
  }
152
152
  }
153
153
  }
154
+ static toCredentials() {
155
+ const all = this.getAll() ?? {};
156
+ return Object.entries(all)
157
+ .map(([k, v]) => `${encodeURIComponent(k)}=${encodeURIComponent(v)}`)
158
+ .join('; ');
159
+ }
154
160
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure-net/kit",
3
- "version": "5.0.2",
3
+ "version": "5.0.3",
4
4
  "license": "MIT",
5
5
  "author": "Pixel1917",
6
6
  "description": "Universal toolkit and library collection, developed as part of the Azure-net ecosystem",