Vincent Weevers
Vincent Weevers
If you were to listen for `'put'` on the sublevel instance, you'd get pre-encoded values as well. That part is by design: > Any keys, values and range options in...
> The expected behavior for me would be that no matter where I put the put operation, it would result in the same encoding showing up in the event handler....
> The problem that I am having is that I would like to process the input the same way no matter if it comes through root or a sublevel Can...
On `classic-level` specifically, we could perhaps make [this](https://github.com/Level/classic-level/blob/20f4a3474b9a02d6c8ec4e0b589e0e0d906b6428/index.js#L30-L31) configurable, so that it'll always encode to the same type (but Uint8Array isn't supported natively yet, so your only choice would be...
> It seems to me like this may be an aspect worth to expose in a more verbose fashion Currently, because the events don't use encoded values, I consider that...
Yeah that's a bug. I'm guessing it's caused by class properties not being enumerable. Or more generally, the assumption that an encoding is a plain object (which is my bad).
The encoding is cloned as `{ ...options }` here and thus won't include class methods: https://github.com/Level/transcoder/blob/8963603dc4a7c1c599beb85bad3e09788e0235d1/index.js#L111
I'd be okay with a short-term solution like that (and to later refactor it). I don't have capacity atm to think about alternatives.
See https://github.com/Level/read-stream/blob/main/UPGRADING.md
If the tests are passing locally, IMO we can wait with adding a travis+airtap setup