Skip to main content

from ()

Creates a normalized string from the provided value, with unique punctuation differentiating types and characteristics.

Parameters

$value
The value from which to generate a string.
Type
*

Return Value

String
The string representation of the given value.

Example

@use '@sass-fairy/string';

@debug string.from(01234567890);
// '1234567890'

@debug string.from(rgba(127, 255, 34, 1));
// '#7fff22'

@debug string.from([10px 20px, 30px]);
// '[(10px 20px), 30px]'

$font-weights: (regular: 400, medium: 500, bold: 700);

@debug string.from($font-weight);
// '{regular: 400; medium: 500; bold: 700}'