dfahlander / typeson-registry

The type registry for typeson
MIT License
6 stars 5 forks source link

feat: add support for `maxByteLength` #35

Closed brettz9 closed 5 months ago

brettz9 commented 11 months ago

feat: add support for maxByteLength

BREAKING CHANGE:

Encodes array buffers as objects rather than strings in order to add any metadata

Wanted to give you a heads up, @dfahlander , as it modifies long-standing types like arraybuffer (to accommodate the new maxByteLength option)...

The semver check is because this option is only available in Node 20+ (and not yet in Firefox, I might add).

brettz9 commented 11 months ago

Btw, here's a link to ArrayBuffer which makes mention of the new option this PR attempts to support.

brettz9 commented 6 months ago

All right if I go ahead and merge, @dfahlander ?

brettz9 commented 5 months ago

Assume it's ok since haven't heard back...