-
Notifications
You must be signed in to change notification settings - Fork 33
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
better structured clone support #50
Comments
before you jump onto the conclusion of why Code can do different things depending on if it's signed or not. Math.atan2(0, 0); //returns 0
Math.atan2(0, -0); //returns Pi the reason why we have
|
This is really cool, nice work! Yes, I will take a look to see if there are some improvements that can be made, when I get a chance, although no guarantees, since there may be some limitations from data formats. Again, this is a great analysis and set of tests! |
I added the |
I think Object literals could just be as simple as just prefixing the next following value... var isObjectLiteral = buffer[x]
if (isObjectLiteral) {
return Object( read_next_value_as_normal() )
} |
I just publish this test page today to test out different binary package
Maybe this is something you wish to improve on?
(you can also click on each ❌ to see more details - and see the result in the console for more detail)
A summary of what i think should be supported
-0
structuredClone(BigInt('0x' + 'FF'.repeat(1024)))
Object(2n)
ArrayBuffer
and return it as anArrayBuffer
(not as an Uint8Array with an offset)var input = {}; input.input = input
,var input = [0]; input[0] = input
I don't know about Blob/Files.
I think it would be better to just encode a references point to some blob index rather than trying encode a hole file into memory. So first you would encode the structure, emit all the data and then transfer/pipe the blobs over the wire later in your own way. kind of how the web has a transferable list when using postMessage
The text was updated successfully, but these errors were encountered: