* throw error if the argument is falsy.
(arg, name, reason)
| 1606 | * throw error if the argument is falsy. |
| 1607 | */ |
| 1608 | function assertArg(arg, name, reason) { |
| 1609 | if (!arg) { |
| 1610 | throw ngMinErr('areq', "Argument '{0}' is {1}", (name || '?'), (reason || "required")); |
| 1611 | } |
| 1612 | return arg; |
| 1613 | } |
| 1614 | |
| 1615 | function assertArgFn(arg, name, acceptArrayAnnotation) { |
| 1616 | if (acceptArrayAnnotation && isArray(arg)) { |
no outgoing calls
no test coverage detected