-
Notifications
You must be signed in to change notification settings - Fork 734
New Proposal: TypeArray encoding #393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
What's the difference with https://github.com/tc39/proposal-arraybuffer-base64 (sure, excepting place and names of methods)? |
Key difference is the additional support of both hex and base32 and a simpler interface (no options argument with the ability to add other encoding options later) |
Typically we only put stage 0 proposals in this repo when they're presented, or planned to be presented, at a TC39 plenary - the deadline has passed for next week's meeting, which means that you can still request advancement but delegates may object solely on the basis of the deadline. Are you planning to present next week, or in March? |
Likely in March. And there's no rush on getting this PR landed. I wanted to at least open the discussion |
@jasnell maybe it's better to propose it in the scope of the already existent proposal since they have the same target? |
@jasnell you may want to drop the proposal repo link into matrix too. |
e393943
to
fb55f36
Compare
I like the idea of adding support for base32 and hex under the ArrayBuffer proposal since it works off the same idea and is a bit farther along. Is it possible to extend the proposal (or add a new one) for |
@kitsune7 I intend to add support for hex, but am unconvinced by the need for base32; see tc39/proposal-arraybuffer-base64#7 (comment). But let's continue the conversation on that repository rather than here. |
@jasnell the March meeting has passed; are you intending to propose this at the June meeting? |
Closing for now; happy to reopen if you plan to present it in the future. |
Proposes a new API for
TypedArray
to support built-inhex
,base64
,base64url
, andbase32
encoding.Example:
Currently, each runtime has to handle these differently. Node.js has it's non-standard
Buffer
API, Deno has its own APIs, browser developers have to choose from a variety of userland options. These encodings are common enough, however, that they warrant being built into the language.My goal will be to present this at an upcoming TC-39, but also looking for a champion.