@tempots/std
smartQuote() function
Converts a string in a quoted string.
Signature:
smartQuote: (s: string, prefer?: string) => string
Parameters
Parameter |
Type |
Description |
---|---|---|
s |
string |
The string to quote. |
prefer |
string |
(Optional) The preferred quote character. Defaults to single quote ( |
Returns: string
The quoted string.