MCPcopy Create free account
hub / github.com/apache/cloudstack / assertArg

Function assertArg

tools/ngui/static/js/lib/angular.js:1037–1042  ·  view source on GitHub ↗

* throw error if the argument is falsy.

(arg, name, reason)

Source from the content-addressed store, hash-verified

1035 * throw error if the argument is falsy.
1036 */
1037function assertArg(arg, name, reason) {
1038 if (!arg) {
1039 throw new Error("Argument '" + (name || '?') + "' is " + (reason || "required"));
1040 }
1041 return arg;
1042}
1043
1044function assertArgFn(arg, name, acceptArrayAnnotation) {
1045 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