-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat(bindings): Enhance existing parse function to accept both string and buffer types #9876 #10371
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
|
No dependency changes detected. Learn more about Socket for GitHub ↗︎ 👍 No dependency changes detected in pull request |
7fea2c2
to
4dae700
Compare
… to accept `Buffer` or `string` as input types - Introduced a new `stringify` function to handle conversion between `Buffer` and `string`. - Updated type definitions in `binding.d.ts` to reflect the changes in function signatures. - Added tests for asynchronous and synchronous parsing with `Buffer` input.
56272c1
to
258d648
Compare
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.
to_string()
always allocates, while into_owned
allocates only if necessary.
In this case it would be mostly the same but just for consistency
Co-authored-by: Donny/강동윤 <[email protected]>
CodSpeed Performance ReportMerging #10371 will degrade performances by 2.73%Comparing Summary
Benchmarks breakdown
|
parse
andparseSync
functions to accept both string and Buffer inputs.Fixes: #9876