length - nodef/extra-function GitHub Wiki

Get the number of parameters of a function.

Similar: name, length.

function length(x)
// x: a function
const xfunction = require('extra-function');


xfunction.length(() => 0);
// → 0

xfunction.length((x, y) => 0);
// → 2

References