MCPcopy Index your code
hub / github.com/angular-ui/ui-router / assertArgFn

Function assertArgFn

test/angular/1.6/angular.js:2104–2112  ·  view source on GitHub ↗
(arg, name, acceptArrayAnnotation)

Source from the content-addressed store, hash-verified

2102}
2103
2104function assertArgFn(arg, name, acceptArrayAnnotation) {
2105 if (acceptArrayAnnotation && isArray(arg)) {
2106 arg = arg[arg.length - 1];
2107 }
2108
2109 assertArg(isFunction(arg), name, 'not a function, got ' +
2110 (arg && typeof arg === 'object' ? arg.constructor.name || 'Object' : typeof arg));
2111 return arg;
2112}
2113
2114/**
2115 * throw error if the name given is hasOwnProperty

Callers 3

annotateFunction · 0.70
loadModulesFunction · 0.70
$ControllerProviderFunction · 0.70

Calls 3

isArrayFunction · 0.85
assertArgFunction · 0.70
isFunctionFunction · 0.70

Tested by

no test coverage detected