* throw error if the argument is falsy.
(arg, name, reason)
| 2085 | * throw error if the argument is falsy. |
| 2086 | */ |
| 2087 | function assertArg(arg, name, reason) { |
| 2088 | if (!arg) { |
| 2089 | throw ngMinErr('areq', 'Argument \'{0}\' is {1}', (name || '?'), (reason || 'required')); |
| 2090 | } |
| 2091 | return arg; |
| 2092 | } |
| 2093 | |
| 2094 | function assertArgFn(arg, name, acceptArrayAnnotation) { |
| 2095 | if (acceptArrayAnnotation && isArray(arg)) { |
no outgoing calls
no test coverage detected