* Returns a self-defaulting assignment, using the `||=` logical assignment * operator when supported and falling back to `target = target || value` * otherwise. `target` is evaluated twice in the fallback, so it must be * side-effect free. The expression evaluates to the resulting value. * M
(target, value)
| 444 | * @returns {string} assignment expression |
| 445 | */ |
| 446 | assignOr(target, value) { |
| 447 | return this.supportsLogicalAssignment() |
| 448 | ? `${target} ||= ${value}` |
| 449 | : `${target} = ${target} || ${value}`; |
| 450 | } |
| 451 | |
| 452 | /** |
| 453 | * Returns destructure array code. |
no test coverage detected