* throw error if the argument is falsy.
(arg, name, reason)
| 1828 | * throw error if the argument is falsy. |
| 1829 | */ |
| 1830 | function assertArg(arg, name, reason) { |
| 1831 | if (!arg) { |
| 1832 | throw ngMinErr('areq', "Argument '{0}' is {1}", (name || '?'), (reason || "required")); |
| 1833 | } |
| 1834 | return arg; |
| 1835 | } |
| 1836 | |
| 1837 | function assertArgFn(arg, name, acceptArrayAnnotation) { |
| 1838 | if (acceptArrayAnnotation && isArray(arg)) { |
no outgoing calls
no test coverage detected