* throw error if the argument is falsy.
(arg, name, reason)
| 1586 | * throw error if the argument is falsy. |
| 1587 | */ |
| 1588 | function assertArg(arg, name, reason) { |
| 1589 | if (!arg) { |
| 1590 | throw ngMinErr('areq', "Argument '{0}' is {1}", (name || '?'), (reason || "required")); |
| 1591 | } |
| 1592 | return arg; |
| 1593 | } |
| 1594 | |
| 1595 | function assertArgFn(arg, name, acceptArrayAnnotation) { |
| 1596 | if (acceptArrayAnnotation && isArray(arg)) { |
no outgoing calls
no test coverage detected