MCPcopy Create free account
hub / github.com/bclinkinbeard/angular / assertArg

Function assertArg

test/fixtures/foo.js:1507–1512  ·  view source on GitHub ↗

* throw error if the argument is falsy.

(arg, name, reason)

Source from the content-addressed store, hash-verified

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

Callers 3

assertArgFnFunction · 0.85
$CompileProviderFunction · 0.85
compileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected