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

Function assertArg

test/angular/1.2/angular.js:1509–1514  ·  view source on GitHub ↗

* throw error if the argument is falsy.

(arg, name, reason)

Source from the content-addressed store, hash-verified

1507 * throw error if the argument is falsy.
1508 */
1509function assertArg(arg, name, reason) {
1510 if (!arg) {
1511 throw ngMinErr('areq', "Argument '{0}' is {1}", (name || '?'), (reason || "required"));
1512 }
1513 return arg;
1514}
1515
1516function assertArgFn(arg, name, acceptArrayAnnotation) {
1517 if (acceptArrayAnnotation && isArray(arg)) {

Callers 3

assertArgFnFunction · 0.70
$CompileProviderFunction · 0.70
compileFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected