MCPcopy Create free account
hub / github.com/EricSimons/ionic-course / assertArg

Function assertArg

code/songhop/www/lib/angular/angular.js:1562–1567  ·  view source on GitHub ↗

* throw error if the argument is falsy.

(arg, name, reason)

Source from the content-addressed store, hash-verified

1560 * throw error if the argument is falsy.
1561 */
1562function assertArg(arg, name, reason) {
1563 if (!arg) {
1564 throw ngMinErr('areq', "Argument '{0}' is {1}", (name || '?'), (reason || "required"));
1565 }
1566 return arg;
1567}
1568
1569function assertArgFn(arg, name, acceptArrayAnnotation) {
1570 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