MCPcopy Create free account
hub / github.com/DIYgod/RSSHub / constructCookieArray

Function constructCookieArray

lib/utils/playwright-utils.ts:27–31  ·  view source on GitHub ↗
(cookieStr, domain)

Source from the content-addressed store, hash-verified

25 * @return Browser cookie array
26 */
27const constructCookieArray = (cookieStr, domain) =>
28 cookieStr.split('; ').map((item) => {
29 const [name, value] = item.split('=');
30 return value === undefined ? { name: '', value: name, domain, path: '/' } : { name, value, domain, path: '/' };
31 });
32
33/**
34 * Set cookies for a page

Callers 2

setCookiesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected