UNPKG

@scalar/api-client

Version:

the open source API testing client

13 lines (12 loc) 280 B
const i = (n) => { if (!n || typeof n != "string") return null; const r = n.indexOf("="); if (r === -1) return null; const t = n.substring(0, r).trim(), s = n.substring(r + 1).trim(); return t ? { name: t, value: s } : null; }; export { i as parseSetCookie };