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

Function assertArg

test/angular/1.7/angular.js:2094–2099  ·  view source on GitHub ↗

* throw error if the argument is falsy.

(arg, name, reason)

Source from the content-addressed store, hash-verified

2092 * throw error if the argument is falsy.
2093 */
2094function assertArg(arg, name, reason) {
2095 if (!arg) {
2096 throw ngMinErr('areq', 'Argument \'{0}\' is {1}', (name || '?'), (reason || 'required'));
2097 }
2098 return arg;
2099}
2100
2101function assertArgFn(arg, name, acceptArrayAnnotation) {
2102 if (acceptArrayAnnotation && isArray(arg)) {

Callers 4

assertArgFnFunction · 0.70
loadModulesFunction · 0.70
$CompileProviderFunction · 0.70
compileFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected