MCPcopy Create free account
hub / github.com/binux/qiandao / assertArg

Function assertArg

web/static/components/angularjs/angular.js:1498–1503  ·  view source on GitHub ↗

* throw error if the argument is falsy.

(arg, name, reason)

Source from the content-addressed store, hash-verified

1496 * throw error if the argument is falsy.
1497 */
1498function assertArg(arg, name, reason) {
1499 if (!arg) {
1500 throw ngMinErr('areq', "Argument '{0}' is {1}", (name || '?'), (reason || "required"));
1501 }
1502 return arg;
1503}
1504
1505function assertArgFn(arg, name, acceptArrayAnnotation) {
1506 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