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

Function assertArg

test/angular/1.6/angular.js:2097–2102  ·  view source on GitHub ↗

* throw error if the argument is falsy.

(arg, name, reason)

Source from the content-addressed store, hash-verified

2095 * throw error if the argument is falsy.
2096 */
2097function assertArg(arg, name, reason) {
2098 if (!arg) {
2099 throw ngMinErr('areq', 'Argument \'{0}\' is {1}', (name || '?'), (reason || 'required'));
2100 }
2101 return arg;
2102}
2103
2104function assertArgFn(arg, name, acceptArrayAnnotation) {
2105 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