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