MCPcopy Create free account
hub / github.com/aosabook/500lines / assertArgFn

Function assertArgFn

spreadsheet/code/lib/angular.js:1615–1623  ·  view source on GitHub ↗
(arg, name, acceptArrayAnnotation)

Source from the content-addressed store, hash-verified

1613}
1614
1615function assertArgFn(arg, name, acceptArrayAnnotation) {
1616 if (acceptArrayAnnotation && isArray(arg)) {
1617 arg = arg[arg.length - 1];
1618 }
1619
1620 assertArg(isFunction(arg), name, 'not a function, got ' +
1621 (arg && typeof arg === 'object' ? arg.constructor.name || 'Object' : typeof arg));
1622 return arg;
1623}
1624
1625/**
1626 * throw error if the name given is hasOwnProperty

Callers 3

annotateFunction · 0.85
loadModulesFunction · 0.85
$ControllerProviderFunction · 0.85

Calls 2

assertArgFunction · 0.85
isFunctionFunction · 0.85

Tested by

no test coverage detected