xhr.mjs 711 B

12345678910111213141516171819202122232425262728
  1. /**
  2. * @license Angular v20.1.0
  3. * (c) 2010-2025 Google LLC. https://angular.io/
  4. * License: MIT
  5. */
  6. function parseCookieValue(cookieStr, name) {
  7. name = encodeURIComponent(name);
  8. for (const cookie of cookieStr.split(';')) {
  9. const eqIndex = cookie.indexOf('=');
  10. const [cookieName, cookieValue] = eqIndex == -1 ? [cookie, ''] : [cookie.slice(0, eqIndex), cookie.slice(eqIndex + 1)];
  11. if (cookieName.trim() === name) {
  12. return decodeURIComponent(cookieValue);
  13. }
  14. }
  15. return null;
  16. }
  17. /**
  18. * A wrapper around the `XMLHttpRequest` constructor.
  19. *
  20. * @publicApi
  21. */
  22. class XhrFactory {
  23. }
  24. export { XhrFactory, parseCookieValue };
  25. //# sourceMappingURL=xhr.mjs.map