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

Function assertNoUrlInOptionsObject

source/create.ts:42–46  ·  view source on GitHub ↗
(options: Record<string, unknown>)

Source from the content-addressed store, hash-verified

40const optionsObjectUrlErrorMessage = 'The `url` option is not supported in options objects. Pass it as the first argument instead.';
41
42const assertNoUrlInOptionsObject = (options: Record<string, unknown>): void => {
43 if (Object.hasOwn(options, 'url')) {
44 throw new TypeError(optionsObjectUrlErrorMessage);
45 }
46};
47
48const cloneWithProperty = <Value extends Record<string, unknown>>(value: Value, property: string, propertyValue: unknown): Value => {
49 const clone = Object.create(Object.getPrototypeOf(value), Object.getOwnPropertyDescriptors(value)) as Value;

Callers 2

makeRequestFunction · 0.85
createFunction · 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…