MCPcopy Index your code
hub / github.com/nodejs/node / requiredArguments

Function requiredArguments

lib/internal/webidl.js:612–620  ·  view source on GitHub ↗

* Throws when a Web IDL operation receives too few arguments. * @param {number} length Actual argument count. * @param {number} required Required argument count. * @param {ConversionOptions} [options] Conversion options. * @returns {void}

(length, required, options = kEmptyObject)

Source from the content-addressed store, hash-verified

610 * @returns {void}
611 */
612function requiredArguments(length, required, options = kEmptyObject) {
613 if (length < required) {
614 throw makeException(
615 `${required} argument${
616 required === 1 ? '' : 's'
617 } required, but only ${length} present.`,
618 makeOptions(options, '', 'ERR_MISSING_ARGS'));
619 }
620}
621
622/**
623 * Creates a converter for a Web IDL enum type.

Callers

nothing calls this directly

Calls 2

makeExceptionFunction · 0.85
makeOptionsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…