unassert-js / unassert

Encourages programming with assertions by providing tools to compile them away.
MIT License
192 stars 13 forks source link

Support safe removal of loop invariants in for-of statement #35

Closed twada closed 2 years ago

twada commented 2 years ago

input:

    for (const i of [a, b])
      assert (0 < i);

output:

    for (const i of [a, b]) {
    }