SassyLists 2.2.4 → 2.2.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +2 -1
  3. data/README.md +4 -4
  4. data/lib/SassyLists.rb +2 -2
  5. data/stylesheets/SassyLists/_chunk.scss +19 -19
  6. data/stylesheets/SassyLists/_comma-list.scss +12 -12
  7. data/stylesheets/SassyLists/_contain.scss +23 -23
  8. data/stylesheets/SassyLists/_count-values.scss +14 -14
  9. data/stylesheets/SassyLists/_debug.scss +26 -26
  10. data/stylesheets/SassyLists/_every.scss +19 -19
  11. data/stylesheets/SassyLists/_explode.scss +23 -23
  12. data/stylesheets/SassyLists/_first.scss +29 -29
  13. data/stylesheets/SassyLists/_flatten.scss +20 -20
  14. data/stylesheets/SassyLists/_has-multiple-values.scss +17 -17
  15. data/stylesheets/SassyLists/_has-values.scss +17 -17
  16. data/stylesheets/SassyLists/_insert-nth.scss +27 -27
  17. data/stylesheets/SassyLists/_intersection.scss +17 -17
  18. data/stylesheets/SassyLists/_is-empty.scss +21 -21
  19. data/stylesheets/SassyLists/_is-single.scss +21 -21
  20. data/stylesheets/SassyLists/_is-symmetrical.scss +25 -25
  21. data/stylesheets/SassyLists/_last-index.scss +18 -18
  22. data/stylesheets/SassyLists/_last.scss +26 -26
  23. data/stylesheets/SassyLists/_loop.scss +29 -29
  24. data/stylesheets/SassyLists/_prepend.scss +17 -17
  25. data/stylesheets/SassyLists/_purge.scss +19 -19
  26. data/stylesheets/SassyLists/_random-value.scss +28 -28
  27. data/stylesheets/SassyLists/_range.scss +26 -26
  28. data/stylesheets/SassyLists/_remove-duplicates.scss +20 -20
  29. data/stylesheets/SassyLists/_remove-nth.scss +25 -25
  30. data/stylesheets/SassyLists/_remove.scss +21 -21
  31. data/stylesheets/SassyLists/_replace-nth.scss +25 -25
  32. data/stylesheets/SassyLists/_replace.scss +24 -24
  33. data/stylesheets/SassyLists/_reverse.scss +20 -20
  34. data/stylesheets/SassyLists/_shuffle.scss +19 -19
  35. data/stylesheets/SassyLists/_slice.scss +34 -34
  36. data/stylesheets/SassyLists/_some.scss +23 -23
  37. data/stylesheets/SassyLists/_sort.scss +26 -26
  38. data/stylesheets/SassyLists/_sum.scss +28 -28
  39. data/stylesheets/SassyLists/_tail.scss +20 -20
  40. data/stylesheets/SassyLists/_to-list.scss +18 -18
  41. data/stylesheets/SassyLists/_to-map.scss +32 -32
  42. data/stylesheets/SassyLists/_to-string.scss +26 -26
  43. data/stylesheets/SassyLists/_union.scss +20 -20
  44. data/stylesheets/SassyLists/_walk.scss +21 -21
  45. data/stylesheets/SassyLists/helpers/_is-number.scss +10 -10
  46. data/stylesheets/SassyLists/helpers/_missing-dependencies.scss +10 -10
  47. data/stylesheets/SassyLists/helpers/_str-compare.scss +12 -12
  48. data/stylesheets/SassyLists/helpers/_true.scss +10 -10
  49. data/stylesheets/_SassyLists.scss +2 -2
  50. metadata +10 -10
@@ -1,28 +1,28 @@
1
- /**
2
- * Replaces value at `$index` from `$list` by `$value`.
3
- *
4
- * @ignore Documentation: http://sassylists.com/documentation.html#sl-replace-nth
5
- *
6
- * @requires sl-purge
7
- * @requires sl-is-true
8
- * @requires sl-to-list
9
- *
10
- * @param {List} $list - list to update
11
- * @param {Number} $index - index to update
12
- * @param {*} $value - new value for index
13
- *
14
- * @throws Invalid index $index for `sl-replace-nth`.
15
- *
16
- * @example
17
- * sl-replace-nth(a b c, 2, z)
18
- * // a z c
19
- *
20
- * @example
21
- * sl-replace-nth(a b c, 100, z)
22
- * // null
23
- *
24
- * @return {List | Null}
25
- */
1
+ ///
2
+ /// Replaces value at `$index` from `$list` by `$value`.
3
+ ///
4
+ /// @ignore Documentation: http://at-import.github.io/SassyLists/documentation/#function-sl-replace-nth
5
+ ///
6
+ /// @requires sl-purge
7
+ /// @requires sl-is-true
8
+ /// @requires sl-to-list
9
+ ///
10
+ /// @param {List} $list - list to update
11
+ /// @param {Number} $index - index to update
12
+ /// @param {*} $value - new value for index
13
+ ///
14
+ /// @throws Invalid index $index for `sl-replace-nth`.
15
+ ///
16
+ /// @example
17
+ /// sl-replace-nth(a b c, 2, z)
18
+ /// // a z c
19
+ ///
20
+ /// @example
21
+ /// sl-replace-nth(a b c, 100, z)
22
+ /// // null
23
+ ///
24
+ /// @return {List | Null}
25
+ ///
26
26
 
27
27
  @function sl-replace-nth($list, $index, $value) {
28
28
  @if sl-missing-dependencies(sl-purge, sl-is-true, sl-to-list) == true { @return null; }
@@ -1,26 +1,26 @@
1
- /**
2
- * Replaces `$old` by `$new` in `$list`.
3
- *
4
- * @ignore Documentation: http://sassylists.com/documentation.html#replace
5
- *
6
- * @requires sl-is-true
7
- * @requires sl-purge
8
- * @requires sl-to-list
9
- *
10
- * @param {List} $list - list to update
11
- * @param {*} $old - value to replace
12
- * @param {*} $value - new value for $old
13
- *
14
- * @example
15
- * sl-replace(a b c, b, z)
16
- * // a z c
17
- *
18
- * @example
19
- * sl-replace(a b c, y, z)
20
- * // a b c
21
- *
22
- * @return {List}
23
- */
1
+ ///
2
+ /// Replaces `$old` by `$new` in `$list`.
3
+ ///
4
+ /// @ignore Documentation: http://at-import.github.io/SassyLists/documentation/#function-sl-replace
5
+ ///
6
+ /// @requires sl-is-true
7
+ /// @requires sl-purge
8
+ /// @requires sl-to-list
9
+ ///
10
+ /// @param {List} $list - list to update
11
+ /// @param {*} $old - value to replace
12
+ /// @param {*} $value - new value for $old
13
+ ///
14
+ /// @example
15
+ /// sl-replace(a b c, b, z)
16
+ /// // a z c
17
+ ///
18
+ /// @example
19
+ /// sl-replace(a b c, y, z)
20
+ /// // a b c
21
+ ///
22
+ /// @return {List}
23
+ ///
24
24
 
25
25
  @function sl-replace($list, $old, $value) {
26
26
  @if sl-missing-dependencies(sl-is-true, sl-purge, sl-to-list) == true { @return null; }
@@ -43,4 +43,4 @@
43
43
  $list: if(sl-is-true($value), $list, sl-purge($list));
44
44
 
45
45
  @return sl-to-list($list);
46
- }
46
+ }
@@ -1,18 +1,18 @@
1
- /**
2
- * Reverses the order of `$list`.
3
- *
4
- * @ignore Documentation: http://sassylists.com/documentation.html#sl-reverse
5
- *
6
- * @param {List} $list - list to reverse
7
- *
8
- * @requires sl-to-list
9
- *
10
- * @example
11
- * sl-reverse(a b c)
12
- * // c b a
13
- *
14
- * @return {List}
15
- */
1
+ ///
2
+ /// Reverses the order of `$list`.
3
+ ///
4
+ /// @ignore Documentation: http://at-import.github.io/SassyLists/documentation/#function-sl-reverse
5
+ ///
6
+ /// @param {List} $list - list to reverse
7
+ ///
8
+ /// @requires sl-to-list
9
+ ///
10
+ /// @example
11
+ /// sl-reverse(a b c)
12
+ /// // c b a
13
+ ///
14
+ /// @return {List}
15
+ ///
16
16
 
17
17
  @function sl-reverse($list) {
18
18
  @if sl-missing-dependencies(sl-to-list) == true { @return null; }
@@ -33,11 +33,11 @@
33
33
  @return sl-to-list($list);
34
34
  }
35
35
 
36
- /**
37
- * @requires sl-reverse
38
- * @alias sl-reverse
39
- */
36
+ ///
37
+ /// @requires sl-reverse
38
+ /// @alias sl-reverse
39
+ ///
40
40
 
41
41
  @function sl-mirror($list) {
42
42
  @return sl-reverse($list);
43
- }
43
+ }
@@ -1,18 +1,18 @@
1
- /**
2
- * Shuffle `$list` using Fisher-Yates method.
3
- *
4
- * @ignore Documentation: http://sassylists.com/documentation.html#sl-shuffle
5
- *
6
- * @param {List} $list - list to shuffle
7
- *
8
- * @requires sl-to-list
9
- *
10
- * @example
11
- * sl-shuffle(a b c)
12
- * // b a c
13
- *
14
- * @return {List}
15
- */
1
+ ///
2
+ /// Shuffle `$list` using Fisher-Yates method.
3
+ ///
4
+ /// @ignore Documentation: http://at-import.github.io/SassyLists/documentation/#function-sl-shuffle
5
+ ///
6
+ /// @param {List} $list - list to shuffle
7
+ ///
8
+ /// @requires sl-to-list
9
+ ///
10
+ /// @example
11
+ /// sl-shuffle(a b c)
12
+ /// // b a c
13
+ ///
14
+ /// @return {List}
15
+ ///
16
16
 
17
17
  @function sl-shuffle($list) {
18
18
  @if sl-missing-dependencies(sl-to-list) == true { @return null; }
@@ -33,10 +33,10 @@
33
33
  @return sl-to-list($list);
34
34
  }
35
35
 
36
- /**
37
- * @requires sl-shuffle
38
- * @alias sl-shuffle
39
- */
36
+ ///
37
+ /// @requires sl-shuffle
38
+ /// @alias sl-shuffle
39
+ ///
40
40
 
41
41
  @function sl-randomize($list) {
42
42
  @return sl-shuffle($list);
@@ -1,36 +1,36 @@
1
- /**
2
- * Slices `$list` between `$start` and `$end`.
3
- *
4
- * @ignore Documentation: http://sassylists.com/documentation.html#sl-slice
5
- *
6
- * @param {List} $list - list to slice
7
- * @param {Number} $start (1) - start index
8
- * @param {Number} $end (length($list)) - end index
9
- *
10
- * @throws List indexes $start and $end must be numbers for `sl-slice`.
11
- * @throws Start index has to be lesser than or equals to the end index for `sl-slice`.
12
- * @throws List indexes must be non-zero integers for `sl-slice`.
13
- * @throws Start index has to be lesser than or equal to list length for `sl-slice`.
14
- * @throws End index has to be lesser than or equal to list length for `sl-slice`.
15
- *
16
- * @example
17
- * sl-slice(a b c d e, 2, 4)
18
- * // b c d
19
- *
20
- * @example
21
- * sl-slice(a b c d e, 2, 2)
22
- * // b
23
- *
24
- * @example
25
- * sl-slice(a b c d e, 4, 2)
26
- * // null
27
- *
28
- * @example
29
- * sl-slice(a b c d e, -1, 6)
30
- * // null
31
- *
32
- * @return {List | Null}
33
- */
1
+ ///
2
+ /// Slices `$list` between `$start` and `$end`.
3
+ ///
4
+ /// @ignore Documentation: http://at-import.github.io/SassyLists/documentation/#function-sl-slice
5
+ ///
6
+ /// @param {List} $list - list to slice
7
+ /// @param {Number} $start [1] - start index
8
+ /// @param {Number} $end [length[$list]] - end index
9
+ ///
10
+ /// @throws List indexes $start and $end must be numbers for `sl-slice`.
11
+ /// @throws Start index has to be lesser than or equals to the end index for `sl-slice`.
12
+ /// @throws List indexes must be non-zero integers for `sl-slice`.
13
+ /// @throws Start index has to be lesser than or equal to list length for `sl-slice`.
14
+ /// @throws End index has to be lesser than or equal to list length for `sl-slice`.
15
+ ///
16
+ /// @example
17
+ /// sl-slice(a b c d e, 2, 4)
18
+ /// // b c d
19
+ ///
20
+ /// @example
21
+ /// sl-slice(a b c d e, 2, 2)
22
+ /// // b
23
+ ///
24
+ /// @example
25
+ /// sl-slice(a b c d e, 4, 2)
26
+ /// // null
27
+ ///
28
+ /// @example
29
+ /// sl-slice(a b c d e, -1, 6)
30
+ /// // null
31
+ ///
32
+ /// @return {List | Null}
33
+ ///
34
34
 
35
35
  @function sl-slice($list, $start: 1, $end: length($list)) {
36
36
  @if type-of($start) != "number" or type-of($end) != "number" {
@@ -65,4 +65,4 @@
65
65
  }
66
66
 
67
67
  @return $result;
68
- }
68
+ }
@@ -1,26 +1,26 @@
1
- /**
2
- * Tests whether some items from `$list` pass the test implemented by `$function`.
3
- *
4
- * @ignore Documentation: http://sassylists.com/documentation.html#sl-some
5
- *
6
- * @param {List} $list - list to run test against
7
- * @param {String} $function - function to run against every item from list
8
- * @param {ArgList} $args - extra arguments to pass to the function
9
- *
10
- * @example
11
- * sl-some(1 2 3, unitless)
12
- * // true
13
- *
14
- * @example
15
- * sl-some(1 2 3px, unitless)
16
- * // true
17
- *
18
- * @example
19
- * sl-some(1px 2px 3px, unitless)
20
- * // false
21
- *
22
- * @return {Bool}
23
- */
1
+ ///
2
+ /// Tests whether some items from `$list` pass the test implemented by `$function`.
3
+ ///
4
+ /// @ignore Documentation: http://at-import.github.io/SassyLists/documentation/#function-sl-some
5
+ ///
6
+ /// @param {List} $list - list to run test against
7
+ /// @param {String} $function - function to run against every item from list
8
+ /// @param {ArgList} $args - extra arguments to pass to the function
9
+ ///
10
+ /// @example
11
+ /// sl-some(1 2 3, unitless)
12
+ /// // true
13
+ ///
14
+ /// @example
15
+ /// sl-some(1 2 3px, unitless)
16
+ /// // true
17
+ ///
18
+ /// @example
19
+ /// sl-some(1px 2px 3px, unitless)
20
+ /// // false
21
+ ///
22
+ /// @return {Bool}
23
+ ///
24
24
 
25
25
  @function sl-some($list, $function, $args...) {
26
26
  @each $item in $list {
@@ -1,25 +1,25 @@
1
- /**
2
- * Sorts values of `$list` using quick-sort algorithm using `$order`.
3
- *
4
- * @ignore Documentation: http://sassylists.com/documentation.html#sl-sort
5
- *
6
- * @requires sl-str-compare
7
- * @requires sl-has-multiple-values
8
- * @requires sl-to-list
9
- *
10
- * @param {List} $list - list to sort
11
- * @param {List} $order - order to respect
12
- *
13
- * @example
14
- * sl-sort(b a c)
15
- * // a b c
16
- *
17
- * @example
18
- * sl-sort(3 5 1)
19
- * // 1 3 5
20
- *
21
- * @return {List}
22
- */
1
+ ///
2
+ /// Sorts values of `$list` using quick-sort algorithm using `$order`.
3
+ ///
4
+ /// @ignore Documentation: http://at-import.github.io/SassyLists/documentation/#function-sl-sort
5
+ ///
6
+ /// @requires sl-str-compare
7
+ /// @requires sl-has-multiple-values
8
+ /// @requires sl-to-list
9
+ ///
10
+ /// @param {List} $list - list to sort
11
+ /// @param {List} $order - order to respect
12
+ ///
13
+ /// @example
14
+ /// sl-sort(b a c)
15
+ /// // a b c
16
+ ///
17
+ /// @example
18
+ /// sl-sort(3 5 1)
19
+ /// // 1 3 5
20
+ ///
21
+ /// @return {List}
22
+ ///
23
23
 
24
24
  @function sl-sort($list, $order: "!" "#" "$" "%" "&" "'" "(" ")" "*" "+" "," "-" "." "/" "[" "\\" "]" "^" "_" "{" "|" "}" "~" "0" "1" "2" "3" "4" "5" "6" "7" "8" "9" "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m" "n" "o" "p" "q" "r" "s" "t" "u" "v" "w" "x" "y" "z") {
25
25
  @if sl-missing-dependencies(sl-str-compare, sl-has-multiple-values, sl-to-list) == true { @return null; }
@@ -51,10 +51,10 @@
51
51
  @return sl-to-list($list);
52
52
  }
53
53
 
54
- /**
55
- * @requires sl-sort
56
- * @alias sl-sort
57
- */
54
+ ///
55
+ /// @requires sl-sort
56
+ /// @alias sl-sort
57
+ ///
58
58
 
59
59
  @function sl-order($list) {
60
60
  @return sl-sort($list);
@@ -1,30 +1,30 @@
1
- /**
2
- * Sums up all numeric values in `$list`, stripping unit if `$force` set to `true`.
3
- *
4
- * @ignore Documentation: http://sassylists.com/documentation.html#sl-sum
5
- *
6
- * @param {List} $list - list
7
- * @param {Bool} $force (false) - enable/disable parseInt
8
- *
9
- * @requires sl-every
10
- * @requires sl-is-number
11
- *
12
- * @throws All items from list are not numbers for `sl-sum`.
13
- *
14
- * @example
15
- * sl-sum(1 2 3)
16
- * // 6
17
- *
18
- * @example
19
- * sl-sum(a b 1)
20
- * null
21
- *
22
- * @example
23
- * sl-sum(1 2 3px, true)
24
- * // 6
25
- *
26
- * @return {Number}
27
- */
1
+ ///
2
+ /// Sums up all numeric values in `$list`, stripping unit if `$force` set to `true`.
3
+ ///
4
+ /// @ignore Documentation: http://at-import.github.io/SassyLists/documentation/#function-sl-sum
5
+ ///
6
+ /// @param {List} $list - list
7
+ /// @param {Bool} $force [false] - enable/disable parseInt
8
+ ///
9
+ /// @requires sl-every
10
+ /// @requires sl-is-number
11
+ ///
12
+ /// @throws All items from list are not numbers for `sl-sum`.
13
+ ///
14
+ /// @example
15
+ /// sl-sum(1 2 3)
16
+ /// // 6
17
+ ///
18
+ /// @example
19
+ /// sl-sum(a b 1)
20
+ /// null
21
+ ///
22
+ /// @example
23
+ /// sl-sum(1 2 3px, true)
24
+ /// // 6
25
+ ///
26
+ /// @return {Number}
27
+ ///
28
28
 
29
29
  @function sl-sum($list, $force: false) {
30
30
  $result: 0;
@@ -45,4 +45,4 @@
45
45
  }
46
46
 
47
47
  @return $result;
48
- }
48
+ }