MCPcopy
hub / github.com/di-sukharev/opencommit / getResponseData

Function getResponseData

out/cli.cjs:57233–57241  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

57231 }
57232 function matchKey(mockDispatch2, { path: path5, method, body, headers }) {
57233 const pathMatch = matchValue(mockDispatch2.path, path5);
57234 const methodMatch = matchValue(mockDispatch2.method, method);
57235 const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true;
57236 const headersMatch = matchHeaders(mockDispatch2, headers);
57237 return pathMatch && methodMatch && bodyMatch && headersMatch;
57238 }
57239 function getResponseData(data) {
57240 if (Buffer.isBuffer(data)) {
57241 return data;
57242 } else if (typeof data === "object") {
57243 return JSON.stringify(data);
57244 } else {

Callers 2

handleReplyFunction · 0.85

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…