Open letmaik opened 2 years ago
I think UInt8Array
is the preferred Buffer replacement, see this. I would accept such a refactor.
@silverwind @mafintosh It seems like a fair bit of work was put into this fork: https://github.com/dnsquery/dns-packet to switch to Uint8Array and add types.
What are the views of current maintainers for this approach? Is the preference to solely swap Buffer
for Uint8Array
or would a TypeScript refactor also be accepted?
UInt8Array will be a breaking change, so I guess it might make sense to bundle a switch to TS with it. I'm not much of a TS aficionado, but I guess I should manage to review if you keep it simple.
you can switch it to use holepunchto/b4a, we use that for easy browser compat
Currently, this library cannot directly be used in non-Node environments (without
Buffer
polyfills). Are there any issues with switching toArrayBuffer
instead? Just wondering if such a contribution would be accepted.