
Security News
Astral Launches pyx: A Python-Native Package Registry
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Here is a Compass Extension providing you all functions you need to manipulate your Sass strings.
char-at($string, $index)
: returns the character from $string
at index $index
levenshtein($a, $b)
: returns the Levenshtein distance between $a
and $b
str-count($string, $needle)
: counts number of occurrences of $needle
in $string
str-ends-with($string, $needle)
: returns whether $string
ends with $needle
str-explode($string, $separator)
: explodes $string
on $separator
occurrencesstr-implode($list)
: implodes $list
into a stringstr-last-index($string, $needle)
: returns last index of $needle
in $string
str-lcfirst($string)
: turns first letter of $string
into lower casestr-pad($string, $length, $pad: " ", $direction: left)
: pads $string
with $pad
to match $length
starting from $direction
str-printf($string, $elements...)
: replaces occurrences of %s
in $string
by elements from $elements
str-repeat($string, $times)
: repeats $string
$times
timesstr-replace($string, $old, $new: "")
: replaces $old
by $new
in $string
respecting $case-sensitive
str-reverse($string)
: reverses stringstr-rot($string, $rot: 13)
: rotates letters in $string
of $rot
position in alphabetstr-shuffle($string)
: shuffles letters in stringstr-split($string)
: splits $string
into a list of charactersstr-starts-with($string, $needle)
: returns whether $string
starts with $needle
str-trim($string)
: removes white spaces before and after $string
str-ucfirst($string)
: turns first letter of $string
into upper casestr-word-count($string)
: counts number of words in $string
stringify($literal)
: casts to stringifyAs well as default Sass core functions:
str-index
str-slice
str-length
str-insert
to-lower-case
to-upper-case
If you feel like an explorer, you can have a look at the code here.
Some functions depend on other functions. If you include functions individually, make sure to check for these dependencies in their respective docs.
Huge thanks to Marc Mintel for his help.
If you experience naming conflicts or want to add your own error handling and dependency checker feel free to use the functions in stylesheets/private
.
These functions do not add any kind of error handling so use them at your own risk!
FAQs
Unknown package
We found that SassyStrings demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
Security News
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.