* throw error if the argument is falsy.
(arg, name, reason)
| 1939 | * throw error if the argument is falsy. |
| 1940 | */ |
| 1941 | function assertArg(arg, name, reason) { |
| 1942 | if (!arg) { |
| 1943 | throw ngMinErr('areq', 'Argument \'{0}\' is {1}', (name || '?'), (reason || 'required')); |
| 1944 | } |
| 1945 | return arg; |
| 1946 | } |
| 1947 | |
| 1948 | function assertArgFn(arg, name, acceptArrayAnnotation) { |
| 1949 | if (acceptArrayAnnotation && isArray(arg)) { |
no outgoing calls
no test coverage detected