Sha256: 5c4df5837f336dcec7f3c64290214067455afeb3b896a4b071c290298f531e32

Contents?: true

Size: 982 Bytes

Versions: 26

Compression:

Stored size: 982 Bytes

Contents

{"version":3,"sources":["../../src/core/getResponse.ts"],"sourcesContent":["import { createRequestId } from '@mswjs/interceptors'\nimport type { RequestHandler } from './handlers/RequestHandler'\nimport { executeHandlers } from './utils/executeHandlers'\n\n/**\n * Finds a response for the given request instance\n * in the array of request handlers.\n * @param handlers The array of request handlers.\n * @param request The `Request` instance.\n * @returns {Response} A mocked response, if any.\n */\nexport const getResponse = async (\n  handlers: Array<RequestHandler>,\n  request: Request,\n): Promise<Response | undefined> => {\n  const result = await executeHandlers({\n    request,\n    requestId: createRequestId(),\n    handlers,\n  })\n\n  return result?.response\n}\n"],"mappings":"AAAA,SAAS,uBAAuB;AAEhC,SAAS,uBAAuB;AASzB,MAAM,cAAc,OACzB,UACA,YACkC;AAClC,QAAM,SAAS,MAAM,gBAAgB;AAAA,IACnC;AAAA,IACA,WAAW,gBAAgB;AAAA,IAC3B;AAAA,EACF,CAAC;AAED,SAAO,QAAQ;AACjB;","names":[]}

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
clapton-0.0.26 lib/clapton/javascripts/node_modules/msw/lib/core/getResponse.mjs.map
clapton-0.0.25 lib/clapton/javascripts/node_modules/msw/lib/core/getResponse.mjs.map
clapton-0.0.24 lib/clapton/javascripts/node_modules/msw/lib/core/getResponse.mjs.map
clapton-0.0.23 lib/clapton/javascripts/node_modules/msw/lib/core/getResponse.mjs.map
clapton-0.0.22 lib/clapton/javascripts/node_modules/msw/lib/core/getResponse.mjs.map
clapton-0.0.21 lib/clapton/javascripts/node_modules/msw/lib/core/getResponse.mjs.map
clapton-0.0.20 lib/clapton/javascripts/node_modules/msw/lib/core/getResponse.mjs.map
clapton-0.0.19 lib/clapton/javascripts/node_modules/msw/lib/core/getResponse.mjs.map
clapton-0.0.18 lib/clapton/javascripts/node_modules/msw/lib/core/getResponse.mjs.map
clapton-0.0.17 lib/clapton/javascripts/node_modules/msw/lib/core/getResponse.mjs.map
clapton-0.0.16 lib/clapton/javascripts/node_modules/msw/lib/core/getResponse.mjs.map
clapton-0.0.15 lib/clapton/javascripts/node_modules/msw/lib/core/getResponse.mjs.map
clapton-0.0.14 lib/clapton/javascripts/node_modules/msw/lib/core/getResponse.mjs.map
clapton-0.0.13 lib/clapton/javascripts/node_modules/msw/lib/core/getResponse.mjs.map
clapton-0.0.12 lib/clapton/javascripts/node_modules/msw/lib/core/getResponse.mjs.map
clapton-0.0.11 lib/clapton/javascripts/node_modules/msw/lib/core/getResponse.mjs.map
clapton-0.0.10 lib/clapton/javascripts/node_modules/msw/lib/core/getResponse.mjs.map
clapton-0.0.9 lib/clapton/javascripts/node_modules/msw/lib/core/getResponse.mjs.map
clapton-0.0.8 lib/clapton/javascripts/node_modules/msw/lib/core/getResponse.mjs.map
clapton-0.0.7 lib/clapton/javascripts/node_modules/msw/lib/core/getResponse.mjs.map