MCPcopy
hub / github.com/sindresorhus/got / assertPlainObject

Function assertPlainObject

source/core/options.ts:912–916  ·  view source on GitHub ↗

Helper function that wraps assert.plainObject() to provide better error messages. When assertion fails, it includes the option name in the error message.

(optionName: string, value: unknown)

Source from the content-addressed store, hash-verified

910When assertion fails, it includes the option name in the error message.
911*/
912function assertPlainObject(optionName: string, value: unknown): void {
913 wrapAssertionWithContext(optionName, () => {
914 assert.plainObject(value);
915 });
916}
917
918export function isSameOrigin(previousUrl: URL, nextUrl: URL): boolean {
919 return previousUrl.origin === nextUrl.origin

Callers 6

agentMethod · 0.85
timeoutMethod · 0.85
headersMethod · 0.85
retryMethod · 0.85
cacheOptionsMethod · 0.85
httpsMethod · 0.85

Calls 1

wrapAssertionWithContextFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…