MCPcopy Index your code
hub / github.com/MALSync/MALSync / getRequestName

Function getRequestName

test/headless/test.js:151–166  ·  view source on GitHub ↗
(message)

Source from the content-addressed store, hash-verified

149}
150
151function getRequestName(message) {
152 let url;
153 let requestBody = '';
154
155 if (typeof message.url === 'object') {
156 url = message.url.url;
157 if (message.url.data) {
158 requestBody = JSON.stringify(message.url.data);
159 }
160 } else {
161 url = message.url;
162 }
163
164 const urlObj = new URL(url);
165 return safeFileName(urlObj.pathname + urlObj.search + urlObj.hash + requestBody);
166}
167
168async function PreparePage(block, page, url, testPage) {
169 const urlObj = new URL(url);

Callers 1

PreparePageFunction · 0.85

Calls 1

safeFileNameFunction · 0.85

Tested by

no test coverage detected