MCPcopy Create free account
hub / github.com/angular/dev-infra / setCookie

Function setCookie

github-actions/browserstack/set-browserstack-env.js:16811–16819  ·  view source on GitHub ↗
(headers, cookie)

Source from the content-addressed store, hash-verified

16809 attributeName = cookieAv;
16810 }
16811 attributeName = attributeName.trim();
16812 attributeValue = attributeValue.trim();
16813 if (attributeValue.length > maxAttributeValueSize) {
16814 return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList);
16815 }
16816 const attributeNameLowercase = attributeName.toLowerCase();
16817 if (attributeNameLowercase === "expires") {
16818 const expiryTime = new Date(attributeValue);
16819 cookieAttributeList.expires = expiryTime;
16820 } else if (attributeNameLowercase === "max-age") {
16821 const charCode = attributeValue.charCodeAt(0);
16822 if ((charCode < 48 || charCode > 57) && attributeValue[0] !== "-") {

Callers 1

deleteCookieFunction · 0.70

Calls 2

stringifyFunction · 0.70
appendMethod · 0.45

Tested by

no test coverage detected