tsify
tsify copied to clipboard
update is_js_ident to cover most cases
Closes #37
Added new test case for validation
Validation: cargo test
@madonoharu Can you look over this PR and see if this could be merged?
@madonoharu it'd be great if we could get this merged
@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
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 😄
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 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 usingwasm-pack
I essentially did the same thing