-
Notifications
You must be signed in to change notification settings - Fork 162
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
add JavaScriptCodec to serialize JavaScript data structure #61
Conversation
src/JavaScriptCodec.ts
Outdated
case "undefined": { | ||
return undefined; | ||
} | ||
case "Map": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would move strings to Enum
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly.
Codecov Report
@@ Coverage Diff @@
## master #61 +/- ##
=========================================
- Coverage 96.9% 96.81% -0.1%
=========================================
Files 15 16 +1
Lines 905 942 +37
Branches 183 194 +11
=========================================
+ Hits 877 912 +35
- Misses 28 30 +2
Continue to review full report at Codecov.
|
@sergeyzenchenko what do you think of it? |
Will retry this feature later based on https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm |
This is an experimental feature to serialize and deserialize JavaScript data structure, just like as https://github.com/yahoo/serialize-javascript
I'm investigating that it really improves performance when
serialize-javascript
is replaced to msgpack, so it is marked as DO NOT MERGE for now.Resolve #58
See also