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