String
Hierarchy
- String
Index
Constructors
Methods
Constructors
constructor
Methods
getValue
- getValue(): string
-
Returns the contents of the string. If the string contains escapes, those escapes are included literally if it’s unquoted, while the values of the escapes are included if it’s quoted.
Example
// string is `Arial`.
string.getValue(); // "Arial"
// string is `"Helvetica Neue"`.
string.getValue(); // "Helvetica Neue"
// string is `\1F46D`.
string.getValue(); // "\\1F46D"
// string is `"\1F46D"`.
string.getValue(); // "👭"Returns string
setValue
- setValue(value: string): void
-
Destructively modifies this string by setting its numeric value to
value.Even if the string was originally quoted, this will cause it to become unquoted.
Deprecated
Use constructor instead.
Parameters
-
value: string
Returns void
-
© 2006–2025 the Sass team, and numerous contributors
Licensed under the MIT License.
https://sass-lang.com/documentation/js-api/classes/types.String
Sass's string type.
This API currently provides no way of distinguishing between a quoted and unquoted string.