* throw error if the argument is falsy.
(arg, name, reason)
| 1560 | * throw error if the argument is falsy. |
| 1561 | */ |
| 1562 | function assertArg(arg, name, reason) { |
| 1563 | if (!arg) { |
| 1564 | throw ngMinErr('areq', "Argument '{0}' is {1}", (name || '?'), (reason || "required")); |
| 1565 | } |
| 1566 | return arg; |
| 1567 | } |
| 1568 | |
| 1569 | function assertArgFn(arg, name, acceptArrayAnnotation) { |
| 1570 | if (acceptArrayAnnotation && isArray(arg)) { |
no outgoing calls
no test coverage detected