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

update is_js_ident to cover most cases #38

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Pistonight
Copy link

@Pistonight Pistonight commented Oct 13, 2023

Closes #37

Added new test case for validation

Validation: cargo test

@Pistonight
Copy link
Author

@madonoharu Can you look over this PR and see if this could be merged?

@Swolebrain
Copy link

@madonoharu it'd be great if we could get this merged

@Swolebrain
Copy link

Swolebrain commented Dec 27, 2023

@Pistonight did you find a way around this, since the PR hasn't been accepted in so long?

I for one ended up creating a build script to fix the types with sed after building using wasm-pack

@samkearney
Copy link

FYI, this will result in a lot of false negatives for what is a valid JS identifier (e.g. many, many Unicode characters are valid in JS identifiers). I took a different approach in #46 by letting the user handle quoting with a new attribute. Sorry, I didn't look hard enough at the PRs to see this one was already open before doing my work.

Hopefully one of these two PRs will be accepted soon 😄

@Pistonight
Copy link
Author

That's what the "most cases" is about :) Quoting a false positive is better than missing one though, since it would still be functional

@Pistonight
Copy link
Author

@Pistonight did you find a way around this, since the PR hasn't been accepted in so long?

I for one ended up creating a build script to fix the types with sed after building using wasm-pack

I essentially did the same thing

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.

Bug: Fields starting with numeric literal need to be quoted
3 participants