MCPcopy Create free account
hub / github.com/Distributive-Network/PythonMonkey / arity

Function arity

tests/js/quint.js:9–12  ·  view source on GitHub ↗
(fn, length)

Source from the content-addressed store, hash-verified

7
8const QUnitAssert = {
9 arity(fn, length)
10 {
11 if (fn.length !== length) throw new Error(`'${fn}' does not have arity of ${length}`);
12 },
13 isFunction(x)
14 {
15 if (typeof x !== 'function') throw new Error(`'${x}' is not a function`);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected