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