* throw error if the argument is falsy.
(arg, name, reason)
| 2092 | * throw error if the argument is falsy. |
| 2093 | */ |
| 2094 | function assertArg(arg, name, reason) { |
| 2095 | if (!arg) { |
| 2096 | throw ngMinErr('areq', 'Argument \'{0}\' is {1}', (name || '?'), (reason || 'required')); |
| 2097 | } |
| 2098 | return arg; |
| 2099 | } |
| 2100 | |
| 2101 | function assertArgFn(arg, name, acceptArrayAnnotation) { |
| 2102 | if (acceptArrayAnnotation && isArray(arg)) { |
no outgoing calls
no test coverage detected