kibertoad / unzipomatic

Modern unzipping library for Node.js
MIT License
3 stars 0 forks source link

Avoid class mutation #17

Open kibertoad opened 5 months ago

kibertoad commented 5 months ago

In several places we have code like this:

    const byteCounter = new AssertByteCountStream(end - start)
    byteCounter.destroy = function () {
      <...>
     }

This should be a permanent method instead, and instance fields should be used to pass the closure variables.

This change should only be done after tests are working.