MCPcopy
hub / github.com/jquery/esprima / assertArgFn

Function assertArgFn

test/3rdparty/angular-1.2.5.js:1363–1371  ·  view source on GitHub ↗
(arg, name, acceptArrayAnnotation)

Source from the content-addressed store, hash-verified

1361}
1362
1363function assertArgFn(arg, name, acceptArrayAnnotation) {
1364 if (acceptArrayAnnotation && isArray(arg)) {
1365 arg = arg[arg.length - 1];
1366 }
1367
1368 assertArg(isFunction(arg), name, 'not a function, got ' +
1369 (arg && typeof arg == 'object' ? arg.constructor.name || 'Object' : typeof arg));
1370 return arg;
1371}
1372
1373/**
1374 * throw error if the name given is hasOwnProperty

Callers 4

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

Calls 3

isArrayFunction · 0.85
assertArgFunction · 0.85
isFunctionFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…