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

Function deleteCookie

github-actions/saucelabs/set-saucelabs-env.js:16790–16801  ·  view source on GitHub ↗
(headers, name, attributes)

Source from the content-addressed store, hash-verified

16788 attributeName = cookieAv;
16789 }
16790 attributeName = attributeName.trim();
16791 attributeValue = attributeValue.trim();
16792 if (attributeValue.length > maxAttributeValueSize) {
16793 return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList);
16794 }
16795 const attributeNameLowercase = attributeName.toLowerCase();
16796 if (attributeNameLowercase === "expires") {
16797 const expiryTime = new Date(attributeValue);
16798 cookieAttributeList.expires = expiryTime;
16799 } else if (attributeNameLowercase === "max-age") {
16800 const charCode = attributeValue.charCodeAt(0);
16801 if ((charCode < 48 || charCode > 57) && attributeValue[0] !== "-") {
16802 return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList);
16803 }
16804 if (!/^\d+$/.test(attributeValue)) {

Callers

nothing calls this directly

Calls 2

setCookieFunction · 0.70
__spreadValuesFunction · 0.70

Tested by

no test coverage detected