Functionsยง
- concat_
call_ ๐to_ template_ literal - Helper function that converts a CallExpr representing
.concat()to a template literal. - convert_
atom_ to_ str_ ref - Helper function to convert Atom to &str (reference, not owned String) Useful when you need a reference instead of an owned String
- convert_
atom_ to_ string - Helper function to convert Wtf8Atom to String
Note:
.as_str()returns anOption<&str>that only fails when the string contains invalid UTF-8 - convert_
concat_ to_ tpl_ expr - Converts a string
.concat()call expression to a template literal expression. - convert_
lit_ to_ number - Helper function to convert a Lit to a number
- convert_
lit_ to_ string - convert_
simple_ tpl_ to_ str_ expr - Converts a simple template literal expression to a regular string literal expression.
This is a convenience wrapper around
convert_tpl_to_string_litthat works withExpr::Tpl. - convert_
str_ lit_ to_ atom - Helper function to safely get Atom from Lit::Str
- convert_
str_ lit_ to_ string - Helper function to safely get string from Lit::Str
- convert_
string_ to_ prop_ name - convert_
tpl_ to_ string_ lit - Helper function to convert a Tpl to a string literal
- convert_
wtf8_ to_ atom - create_
big_ int_ expr - create_
bool_ expr - create_
ident_ expr - create_
null_ expr - create_
number_ expr - create_
string_ expr - expand_
shorthand_ prop - extract_
str_ lit_ ref - Helper function to safely extract string from Lit::Str using Option pattern
- extract_
tpl_ cooked_ value - Helper function to safely get cooked string from TplElement
- should_
wrap_ ๐prop_ name_ key_ with_ quotes