MCPcopy
hub / github.com/sindresorhus/ky / isRequestInstance

Function isRequestInstance

source/core/Ky.ts:78–79  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

76const objectToString = Object.prototype.toString;
77
78const isRequestInstance = (value: unknown): value is Request =>
79 value instanceof globalThis.Request || objectToString.call(value) === '[object Request]';
80
81// Accepted custom responses are treated as full Responses throughout Ky.
82// If a custom fetch returns one, it must behave like a Response for cloning,

Callers 2

#retryFromErrorMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…