MCPcopy Create free account
hub / github.com/aosabook/500lines / assertArg

Function assertArg

spreadsheet/code/lib/angular.js:1608–1613  ·  view source on GitHub ↗

* throw error if the argument is falsy.

(arg, name, reason)

Source from the content-addressed store, hash-verified

1606 * throw error if the argument is falsy.
1607 */
1608function assertArg(arg, name, reason) {
1609 if (!arg) {
1610 throw ngMinErr('areq', "Argument '{0}' is {1}", (name || '?'), (reason || "required"));
1611 }
1612 return arg;
1613}
1614
1615function assertArgFn(arg, name, acceptArrayAnnotation) {
1616 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