Skip to content
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

Faster Native Implementations #5

Open
amiller-gh opened this issue Jul 17, 2020 · 0 comments
Open

Faster Native Implementations #5

amiller-gh opened this issue Jul 17, 2020 · 0 comments

Comments

@amiller-gh
Copy link

amiller-gh commented Jul 17, 2020

Hey @tcr!

As discussed here whatwg/html#793 and here nodejs/node#34355, there are now faster, native methods for running structured clone in both Node.js and the browser.

I'd like to propose we modify this repo to use the native MessageChannel interfaces to provide an async interface for both browser and Node.js environments, and the sync interface for Node.js environments, if it is supported. The sync interface for the browser, and in environments that don't support MessageChannel, would fall back to the existing implementation.

It would be very convenient for the package named structured-clone on NPM to support all these cases in the fastest way possible :)

Happy to help implement. Interested in contributions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant