MCPcopy
hub / github.com/angular-ui/ui-router / assertArg

Function assertArg

test/angular/1.4/angular.js:1830–1835  ·  view source on GitHub ↗

* throw error if the argument is falsy.

(arg, name, reason)

Source from the content-addressed store, hash-verified

1828 * throw error if the argument is falsy.
1829 */
1830function assertArg(arg, name, reason) {
1831 if (!arg) {
1832 throw ngMinErr('areq', "Argument '{0}' is {1}", (name || '?'), (reason || "required"));
1833 }
1834 return arg;
1835}
1836
1837function assertArgFn(arg, name, acceptArrayAnnotation) {
1838 if (acceptArrayAnnotation && isArray(arg)) {

Callers 4

assertArgFnFunction · 0.70
loadModulesFunction · 0.70
$CompileProviderFunction · 0.70
compileFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected