MCPcopy Index your code
hub / github.com/YMFE/yapi / parseCookie

Function parseCookie

server/middleware/mockServer.js:69–78  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

67}
68
69function parseCookie(str) {
70 if (!str || typeof str !== 'string') {
71 return str;
72 }
73 if (str.split(';')[0]) {
74 let c = str.split(';')[0].split('=');
75 return { name: c[0], value: c[1] || '' };
76 }
77 return null;
78}
79
80function handleCorsRequest(ctx) {
81 let header = ctx.request.header;

Callers 1

mockServer.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected