Spec-Zone.ru › Sass

String

Sass's string type.

This API currently provides no way of distinguishing between a quoted and unquoted string.

Hierarchy

  • String
  • Defined in js-api-doc/legacy/function.d.ts:322
Index

Constructors

constructor

Methods

getValue setValue

Constructors

constructor

  • new String(value: string): String
  • Creates an unquoted string with the given contents.

    This API currently provides no way of creating a quoted string.

    Parameters

    • value: string

    Returns String

    • Defined in js-api-doc/legacy/function.d.ts:330

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

    • Defined in js-api-doc/legacy/function.d.ts:355

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

    • Defined in js-api-doc/legacy/function.d.ts:366
sass
  • Compile
    • AsyncCompiler
    • Compiler
    • CompileResult
    • compile
    • compileAsync
    • compileString
    • compileStringAsync
    • initAsyncCompiler
    • initCompiler
  • Options
    • Options
    • StringOptions
    • OutputStyle
    • StringOptionsWithImporter
    • StringOptionsWithoutImporter
    • Syntax
  • Logger
    • Logger
      • silent
    • Logger
    • SourceLocation
    • SourceSpan
    • LoggerWarnOptions
  • Importer
    • NodePackageImporter
    • FileImporter
    • Importer
    • ImporterResult
  • Custom Function
    • CalculationInterpolation
    • CalculationOperation
    • SassArgumentList
    • SassBoolean
    • SassCalculation
    • SassColor
    • SassFunction
    • SassList
    • SassMap
    • SassMixin
    • SassNumber
    • SassString
    • Value
    • CalculationOperator
    • CalculationValue
    • CustomFunction
    • ListSeparator
    • sassFalse
    • sassNull
    • sassTrue
  • Other
    • Exception
    • CanonicalizeContext
    • Deprecations
    • LegacyFileOptions
    • ChannelName
    • ChannelNameHsl
    • ChannelNameHwb
    • ChannelNameLab
    • ChannelNameLch
    • ChannelNameRgb
    • ChannelNameXyz
    • ColorSpaceHsl
    • ColorSpaceHwb
    • ColorSpaceLab
    • ColorSpaceLch
    • ColorSpaceRgb
    • ColorSpaceXyz
    • GamutMapMethod
    • HueInterpolationMethod
    • KnownColorSpace
    • PolarColorSpace
    • PromiseOr
    • RectangularColorSpace
    • info
  • Legacy
    • types
      • Boolean
      • Color
      • Error
      • List
      • Map
      • Null
      • Number
      • String
    • LegacyException
    • LegacyImporterThis
    • LegacyPluginThis
    • LegacyResult
    • LegacySharedOptions
    • LegacyStringOptions
    • LegacyAsyncFunction
    • LegacyAsyncFunctionDone
    • LegacyAsyncImporter
    • LegacyFunction
    • LegacyImporter
    • LegacyImporterResult
    • LegacyOptions
    • LegacySyncFunction
    • LegacySyncImporter
    • LegacyValue
    • FALSE
    • NULL
    • TRUE
    • render
    • renderSync
  • Messages
    • Version
    • Deprecation
    • DeprecationOrId
    • DeprecationStatus
    • deprecations

© 2006–2025 the Sass team, and numerous contributors
Licensed under the MIT License.
https://sass-lang.com/documentation/js-api/classes/types.String

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API