* throw error if the argument is falsy.
(arg, name, reason)
| 1507 | * throw error if the argument is falsy. |
| 1508 | */ |
| 1509 | function assertArg(arg, name, reason) { |
| 1510 | if (!arg) { |
| 1511 | throw ngMinErr('areq', "Argument '{0}' is {1}", (name || '?'), (reason || "required")); |
| 1512 | } |
| 1513 | return arg; |
| 1514 | } |
| 1515 | |
| 1516 | function assertArgFn(arg, name, acceptArrayAnnotation) { |
| 1517 | if (acceptArrayAnnotation && isArray(arg)) { |
no outgoing calls
no test coverage detected