* throw error if the argument is falsy.
(arg, name, reason)
| 2053 | * throw error if the argument is falsy. |
| 2054 | */ |
| 2055 | function assertArg(arg, name, reason) { |
| 2056 | if (!arg) { |
| 2057 | throw ngMinErr('areq', 'Argument \'{0}\' is {1}', (name || '?'), (reason || 'required')); |
| 2058 | } |
| 2059 | return arg; |
| 2060 | } |
| 2061 | |
| 2062 | function assertArgFn(arg, name, acceptArrayAnnotation) { |
| 2063 | if (acceptArrayAnnotation && isArray(arg)) { |
no outgoing calls
no test coverage detected