Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.faremeter.xyz/llms.txt

Use this file to discover all available pages before exploring further.

mock

Type Aliases

MockFetchType

MockFetchType = typeof fetch
Defined in: packages/fetch/src/mock.ts:1

MockResponse

MockResponse = Response
Defined in: packages/fetch/src/mock.ts:2

Functions

responseFeeder()

responseFeeder(responses): {(input, init?): Promise<Response>; (input, init?): Promise<Response>; (input, init?): Promise<Response>; }
Defined in: packages/fetch/src/mock.ts:13 Creates a mock fetch that returns responses from a queue in order. Each call to the returned fetch function shifts the next response from the array. Responses can be either Response objects or fetch functions for dynamic behavior.

Parameters

responses
(Response | {(input, init?): Promise<Response>; (input, init?): Promise<Response>; (input, init?): Promise<Response>; })[] Array of responses or fetch functions to return in order

Returns

A fetch function that serves responses from the queue
(input, init?): Promise<Response>
MDN Reference
Parameters
input
RequestInfo | URL
init?
RequestInit
Returns
Promise<Response>
(input, init?): Promise<Response>
MDN Reference
Parameters
input
string | Request | URL
init?
RequestInit
Returns
Promise<Response>
(input, init?): Promise<Response>
MDN Reference
Parameters
input
string | Request | URL
init?
RequestInit
Returns
Promise<Response>