MCPcopy
hub / github.com/angular-ui/ui-router / assertArgFn

Function assertArgFn

test/angular/1.7/angular.js:2101–2109  ·  view source on GitHub ↗
(arg, name, acceptArrayAnnotation)

Source from the content-addressed store, hash-verified

2099}
2100
2101function assertArgFn(arg, name, acceptArrayAnnotation) {
2102 if (acceptArrayAnnotation && isArray(arg)) {
2103 arg = arg[arg.length - 1];
2104 }
2105
2106 assertArg(isFunction(arg), name, 'not a function, got ' +
2107 (arg && typeof arg === 'object' ? arg.constructor.name || 'Object' : typeof arg));
2108 return arg;
2109}
2110
2111/**
2112 * 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