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

Function assertArg

test/angular/1.3/angular.js:1588–1593  ·  view source on GitHub ↗

* throw error if the argument is falsy.

(arg, name, reason)

Source from the content-addressed store, hash-verified

1586 * throw error if the argument is falsy.
1587 */
1588function assertArg(arg, name, reason) {
1589 if (!arg) {
1590 throw ngMinErr('areq', "Argument '{0}' is {1}", (name || '?'), (reason || "required"));
1591 }
1592 return arg;
1593}
1594
1595function assertArgFn(arg, name, acceptArrayAnnotation) {
1596 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