* throw error if the argument is falsy.
(arg, name, reason)
| 2113 | * throw error if the argument is falsy. |
| 2114 | */ |
| 2115 | function assertArg(arg, name, reason) { |
| 2116 | if (!arg) { |
| 2117 | throw ngMinErr('areq', 'Argument \'{0}\' is {1}', (name || '?'), (reason || 'required')); |
| 2118 | } |
| 2119 | return arg; |
| 2120 | } |
| 2121 | |
| 2122 | function assertArgFn(arg, name, acceptArrayAnnotation) { |
| 2123 | if (acceptArrayAnnotation && isArray(arg)) { |
no outgoing calls
no test coverage detected