Was thinking about it to when working on client side code for @NEARProtocol. We seriously lack JS packaging tools that can operate on method level. Of course language is dynamic, but you should be able to configure exclusion pattern, etc.
What about TextEncoder/TextDecoder APIs? Also I’m meaning to, but never got around, make a lib that exposes all the Buffer.prototype methods as static functions that take Uint8Array’s so only things that need to encode/decode use it but keep API web compatible
That's what i have been thinking about with @lidelOrg but textenconder doesn't cover all the use cases but helps a lot. The bigger problem is the ergonomics of a interface that supports node buffer and a web wrapper arraybuffer thing like this.