Skip to content

Commit c21bdb6

Browse files
refactor(variant.indicator-index()): use directly string.index().
1 parent 4d5d2b7 commit c21bdb6

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
// Modules.
2-
@use '../../string';
2+
@use '../../string/string.index.function' as string-index;
33

44
// Status: TODO: Consider use `list.indexes()`.
55
// The `indicator.index()` function.
66
// @param `$item`
77
// @param `$indicator`
88
// @returns
99
@function index($item, $indicator) {
10-
@each $value in $item {
11-
@if type-of($value) == string {
12-
$index: string.index(#{$value}, $indicator);
10+
@each $element in $item {
11+
@if type-of($element) == string {
12+
$index: string-index.index(#{$element}, $indicator);
1313
@if $index and $index > 0 {
1414
@return $index;
1515
}
@@ -19,4 +19,6 @@
1919
}
2020

2121
// Examples.
22+
// @debug index(+primary, '+');
2223
// @debug index(+primary test, '+');
24+
// @debug index(primary '+test', '+');

0 commit comments

Comments
 (0)