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

feat: Improved compliance of Encoding APIs #420

Merged

Conversation

nabetti1720
Copy link
Contributor

@nabetti1720 nabetti1720 commented Jun 14, 2024

Description of changes

Add the following methods/properties to improve the compliance of Encoding API.

  • TextEncoder.encoding
  • TextDecoder.fatal
  • TextDecoder.ignoreBOM
  • TextDecoder.encoding
  • TextDecoder.decode()

And the encoding_rs crate was adopted for simplicity in dealing with various labels of TextDecoder().

Checklist

  • Created unit tests in tests/unit and/or in Rust for my feature if needed
  • Ran make fix to format JS and apply Clippy auto fixes
  • Made sure my code didn't add any additional warnings: make check
  • Updated documentation if needed (API.md/README.md/Other)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link
Contributor

@richarddavison richarddavison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks very good! Just some minor things :)

llrt_core/src/modules/encoding/string_builder.rs Outdated Show resolved Hide resolved
llrt_core/src/modules/encoding/text_decoder.rs Outdated Show resolved Hide resolved
llrt_core/src/modules/encoding/text_decoder.rs Outdated Show resolved Hide resolved
llrt_core/src/modules/encoding/text_decoder.rs Outdated Show resolved Hide resolved
@nabetti1720
Copy link
Contributor Author

Hi @richarddavison , Thank you for your always accurate reviews.
All have been corrected, please confirm. :)

@richarddavison richarddavison merged commit 8f1eb90 into awslabs:main Jun 17, 2024
5 checks passed
@nabetti1720 nabetti1720 deleted the feat/improved-compliance-of-encoding branch June 17, 2024 21:22
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

Successfully merging this pull request may close these issues.

2 participants