MCPcopy Create free account
hub / github.com/bclinkinbeard/angular / assertArgFn

Function assertArgFn

test/fixtures/foo.js:1514–1522  ·  view source on GitHub ↗
(arg, name, acceptArrayAnnotation)

Source from the content-addressed store, hash-verified

1512}
1513
1514function assertArgFn(arg, name, acceptArrayAnnotation) {
1515 if (acceptArrayAnnotation && isArray(arg)) {
1516 arg = arg[arg.length - 1];
1517 }
1518
1519 assertArg(isFunction(arg), name, 'not a function, got ' +
1520 (arg && typeof arg === 'object' ? arg.constructor.name || 'Object' : typeof arg));
1521 return arg;
1522}
1523
1524/**
1525 * throw error if the name given is hasOwnProperty

Callers 4

annotateFunction · 0.85
loadModulesFunction · 0.85
$ControllerProviderFunction · 0.85
compileToFnFunction · 0.85

Calls 2

assertArgFunction · 0.85
isFunctionFunction · 0.85

Tested by

no test coverage detected