MCPcopy Create free account
hub / github.com/cafebazaar/blacksmith / assertArg

Function assertArg

web/static/bower_components/angular/angular.js:1794–1799  ·  view source on GitHub ↗

* throw error if the argument is falsy.

(arg, name, reason)

Source from the content-addressed store, hash-verified

1792 * throw error if the argument is falsy.
1793 */
1794function assertArg(arg, name, reason) {
1795 if (!arg) {
1796 throw ngMinErr('areq', "Argument '{0}' is {1}", (name || '?'), (reason || "required"));
1797 }
1798 return arg;
1799}
1800
1801function assertArgFn(arg, name, acceptArrayAnnotation) {
1802 if (acceptArrayAnnotation && isArray(arg)) {

Callers 4

assertArgFnFunction · 0.85
loadModulesFunction · 0.85
$CompileProviderFunction · 0.85
compileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected