How to test whether a given string is a valid identifier name #10129
Answered
by
levi-nz
Nirvana-Jie
asked this question in
Q&A
-
Test whether a given string is a valid identifier name like |
Beta Was this translation helpful? Give feedback.
Answered by
levi-nz
Mar 10, 2025
Replies: 1 comment
-
For regular identifiers: https://rustdoc.swc.rs/swc_ecma_utils/fn.is_valid_ident.html For property names: https://rustdoc.swc.rs/swc_ecma_utils/fn.is_valid_prop_ident.html |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Nirvana-Jie
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For regular identifiers: https://rustdoc.swc.rs/swc_ecma_utils/fn.is_valid_ident.html
For property names: https://rustdoc.swc.rs/swc_ecma_utils/fn.is_valid_prop_ident.html