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,27 +1,27 @@
1
- /**
2
- * Shift indexes from `$list` of `$value`.
3
- *
4
- * @author Ana Tudor
5
- *
6
- * @ignore Documentation: http://sassylists.com/documentation.html#sl-loop
7
- *
8
- * @param {List} $list - list to update
9
- * @param {Number} $value (1) - number of position between old and new indexes
10
- *
11
- * @throws $value is not a number for `loop`.
12
- *
13
- * @requires sl-has-multiple-values
14
- *
15
- * @example
16
- * sl-loop(a b c)
17
- * // c a b
18
- *
19
- * @example
20
- * sl-loop(a b c, 2)
21
- * // b c a
22
- *
23
- * @return {List | Null}
24
- */
1
+ ///
2
+ /// Shift indexes from `$list` of `$value`.
3
+ ///
4
+ /// @author Ana Tudor
5
+ ///
6
+ /// @ignore Documentation: http://at-import.github.io/SassyLists/documentation/#function-sl-loop
7
+ ///
8
+ /// @param {List} $list - list to update
9
+ /// @param {Number} $value [1] - number of position between old and new indexes
10
+ ///
11
+ /// @throws $value is not a number for `loop`.
12
+ ///
13
+ /// @requires sl-has-multiple-values
14
+ ///
15
+ /// @example
16
+ /// sl-loop(a b c)
17
+ /// // c a b
18
+ ///
19
+ /// @example
20
+ /// sl-loop(a b c, 2)
21
+ /// // b c a
22
+ ///
23
+ /// @return {List | Null}
24
+ ///
25
25
 
26
26
  @function sl-loop($list, $value: 1) {
27
27
  @if sl-missing-dependencies(sl-has-multiple-values) == true { @return null; }
@@ -45,11 +45,11 @@
45
45
  @return $result;
46
46
  }
47
47
 
48
- /**
49
- * @requires sl-loop
50
- * @alias sl-loop
51
- */
48
+ ///
49
+ /// @requires sl-loop
50
+ /// @alias sl-loop
51
+ ///
52
52
 
53
53
  @function sl-shift-indexes($list, $value: 1) {
54
54
  @return sl-loop($list, $value);
55
- }
55
+ }
@@ -1,20 +1,20 @@
1
- /**
2
- * Adds `$value` as first index of `$list`.
3
- *
4
- * @ignore Documentation: http://sassylists.com/documentation.html#sl-prepend
5
- *
6
- * @requires sl-is-true
7
- * @requires sl-to-list
8
- *
9
- * @param {List} $list - list to preprend value to
10
- * @param {*} $value - value to prepend to the list
11
- *
12
- * @example
13
- * sl-prepend(a b c, z)
14
- * // z a b c
15
- *
16
- * @return {List}
17
- */
1
+ ///
2
+ /// Adds `$value` as first index of `$list`.
3
+ ///
4
+ /// @ignore Documentation: http://at-import.github.io/SassyLists/documentation/#function-sl-prepend
5
+ ///
6
+ /// @requires sl-is-true
7
+ /// @requires sl-to-list
8
+ ///
9
+ /// @param {List} $list - list to preprend value to
10
+ /// @param {*} $value - value to prepend to the list
11
+ ///
12
+ /// @example
13
+ /// sl-prepend(a b c, z)
14
+ /// // z a b c
15
+ ///
16
+ /// @return {List}
17
+ ///
18
18
 
19
19
  @function sl-prepend($list, $value) {
20
20
  @if sl-missing-dependencies(sl-is-true, sl-to-list) == true { @return null; }
@@ -1,18 +1,18 @@
1
- /** Removes all false and null values from `$list`.
2
- *
3
- * @ignore Documentation: http://sassylists.com/documentation.html#purge
4
- *
5
- * @requires sl-is-true
6
- * @requires sl-to-list
7
- *
8
- * @param {List} $list - list to purge
9
- *
10
- * @example
11
- * sl-purge(null a false b)
12
- * // a b
13
- *
14
- * @return {List}
15
- */
1
+ /// Removes all false and null values from `$list`.
2
+ ///
3
+ /// @ignore Documentation: http://at-import.github.io/SassyLists/documentation/#function-sl-purge
4
+ ///
5
+ /// @requires sl-is-true
6
+ /// @requires sl-to-list
7
+ ///
8
+ /// @param {List} $list - list to purge
9
+ ///
10
+ /// @example
11
+ /// sl-purge(null a false b)
12
+ /// // a b
13
+ ///
14
+ /// @return {List}
15
+ ///
16
16
 
17
17
  @function sl-purge($list) {
18
18
  @if sl-missing-dependencies(sl-is-true, sl-to-list) == true { @return null; }
@@ -28,10 +28,10 @@
28
28
  @return sl-to-list($result);
29
29
  }
30
30
 
31
- /**
32
- * @requires sl-purge
33
- * @alias sl-purge
34
- */
31
+ ///
32
+ /// @requires sl-purge
33
+ /// @alias sl-purge
34
+ ///
35
35
 
36
36
  @function sl-clean($list) {
37
37
  @return sl-purge($list);
@@ -1,20 +1,20 @@
1
- /**
2
- * Returns a random value of `$list`.
3
- *
4
- * @ignore Documentation: http://sassylists.com/documentation.html#random-value
5
- *
6
- * @param {List} $list - list to random value from
7
- *
8
- * @throws Cannot find a random value in an empty list.
9
- *
10
- * @requires sl-is-empty
11
- *
12
- * @example
13
- * sl-random-value(a b c)
14
- * // a
15
- *
16
- * @return {*}
17
- */
1
+ ///
2
+ /// Returns a random value of `$list`.
3
+ ///
4
+ /// @ignore Documentation: http://at-import.github.io/SassyLists/documentation/#function-sl-random-value
5
+ ///
6
+ /// @param {List} $list - list to random value from
7
+ ///
8
+ /// @throws Cannot find a random value in an empty list.
9
+ ///
10
+ /// @requires sl-is-empty
11
+ ///
12
+ /// @example
13
+ /// sl-random-value(a b c)
14
+ /// // a
15
+ ///
16
+ /// @return {*}
17
+ ///
18
18
 
19
19
  @function sl-random-value($list) {
20
20
  @if sl-missing-dependencies(sl-is-empty) == true { @return null; }
@@ -24,23 +24,23 @@
24
24
  @return null;
25
25
  }
26
26
 
27
- @return nth($list, random(length($list) - 1) + 1);
27
+ @return nth($list, random(length($list)));
28
28
  }
29
29
 
30
- /**
31
- * @requires sl-random-value
32
- * @alias sl-random-value
33
- */
30
+ ///
31
+ /// @requires sl-random-value
32
+ /// @alias sl-random-value
33
+ ///
34
34
 
35
35
  @function sl-roll($list) {
36
36
  @return sl-random-value($list);
37
37
  }
38
38
 
39
- /**
40
- * @requires sl-random-value
41
- * @alias sl-random-value
42
- */
43
-
39
+ ///
40
+ /// @requires sl-random-value
41
+ /// @alias sl-random-value
42
+ ///
43
+
44
44
  @function sl-luck($list) {
45
45
  @return sl-random-value($list);
46
- }
46
+ }
@@ -1,28 +1,28 @@
1
- /**
2
- * Build a list of values from 1 through `$n`.
3
- *
4
- * @ignore Documentation: http://sassylists.com/documentation.html#sl-range
5
- *
6
- * @param {Number} $n - maximum value
7
- *
8
- * @throws `$n` is not a number for `sl-range`.
9
- * @throws `$n` is not unitless for `sl-range`.
10
- * @throws `$n` is not greater than 0 for `sl-range`.
11
- *
12
- * @example
13
- * sl-range(5)
14
- * // 1 2 3 4 5
15
- *
16
- * @example
17
- * sl-range(1)
18
- * // 1
19
- *
20
- * @example
21
- * sl-range(-42)
22
- * // null
23
- *
24
- * @return {List | Number | Null}
25
- */
1
+ ///
2
+ /// Build a list of values from 1 through `$n`.
3
+ ///
4
+ /// @ignore Documentation: http://at-import.github.io/SassyLists/documentation/#function-sl-range
5
+ ///
6
+ /// @param {Number} $n - maximum value
7
+ ///
8
+ /// @throws `$n` is not a number for `sl-range`.
9
+ /// @throws `$n` is not unitless for `sl-range`.
10
+ /// @throws `$n` is not greater than 0 for `sl-range`.
11
+ ///
12
+ /// @example
13
+ /// sl-range(5)
14
+ /// // 1 2 3 4 5
15
+ ///
16
+ /// @example
17
+ /// sl-range(1)
18
+ /// // 1
19
+ ///
20
+ /// @example
21
+ /// sl-range(-42)
22
+ /// // null
23
+ ///
24
+ /// @return {List | Number | Null}
25
+ ///
26
26
 
27
27
  @function sl-range($n) {
28
28
  @if type-of($n) != "number" {
@@ -51,4 +51,4 @@
51
51
  }
52
52
 
53
53
  @return $range;
54
- }
54
+ }
@@ -1,18 +1,18 @@
1
- /**
2
- * Removes duplicate values from `$list`.
3
- *
4
- * @ignore Documentation: http://sassylists.com/documentation.html#sl-remove-duplicates
5
- *
6
- * @param {List} $list - list to remove duplicates from
7
- *
8
- * @requires sl-to-list
9
- *
10
- * @example
11
- * sl-remove-duplicates(a b a b)
12
- * // a b
13
- *
14
- * @return {List}
15
- */
1
+ ///
2
+ /// Removes duplicate values from `$list`.
3
+ ///
4
+ /// @ignore Documentation: http://at-import.github.io/SassyLists/documentation/#function-sl-remove-duplicates
5
+ ///
6
+ /// @param {List} $list - list to remove duplicates from
7
+ ///
8
+ /// @requires sl-to-list
9
+ ///
10
+ /// @example
11
+ /// sl-remove-duplicates(a b a b)
12
+ /// // a b
13
+ ///
14
+ /// @return {List}
15
+ ///
16
16
 
17
17
  @function sl-remove-duplicates($list) {
18
18
  @if sl-missing-dependencies(sl-to-list) == true { @return null; }
@@ -28,11 +28,11 @@
28
28
  @return sl-to-list($result);
29
29
  }
30
30
 
31
- /**
32
- * @requires sl-remove-duplicates
33
- * @alias sl-remove-duplicates
34
- */
31
+ ///
32
+ /// @requires sl-remove-duplicates
33
+ /// @alias sl-remove-duplicates
34
+ ///
35
35
 
36
36
  @function sl-unique($list) {
37
37
  @return sl-remove-duplicates($list);
38
- }
38
+ }
@@ -1,23 +1,23 @@
1
- /**
2
- * Removes value from `$list` at index `$index`.
3
- *
4
- * @ignore Documentation: http://sassylists.com/documentation.html#sl-remove-nth
5
- *
6
- * @requires sl-replace-nth
7
- *
8
- * @param {List} $list - list to remove value from
9
- * @param {Number} $index - index to remove
10
- *
11
- * @example
12
- * sl-remove-nth(a b c, 2)
13
- * // a c
14
- *
15
- * @example
16
- * sl-remove-nth(a b c, 42)
17
- * // null
18
- *
19
- * @return {List | Null}
20
- */
1
+ ///
2
+ /// Removes value from `$list` at index `$index`.
3
+ ///
4
+ /// @ignore Documentation: http://at-import.github.io/SassyLists/documentation/#function-sl-remove-nth
5
+ ///
6
+ /// @requires sl-replace-nth
7
+ ///
8
+ /// @param {List} $list - list to remove value from
9
+ /// @param {Number} $index - index to remove
10
+ ///
11
+ /// @example
12
+ /// sl-remove-nth(a b c, 2)
13
+ /// // a c
14
+ ///
15
+ /// @example
16
+ /// sl-remove-nth(a b c, 42)
17
+ /// // null
18
+ ///
19
+ /// @return {List | Null}
20
+ ///
21
21
 
22
22
  @function sl-remove-nth($list, $index) {
23
23
  @if sl-missing-dependencies(sl-replace-nth) == true { @return null; }
@@ -25,11 +25,11 @@
25
25
  @return sl-replace-nth($list, $index, "");
26
26
  }
27
27
 
28
- /**
29
- * @requires sl-remove-nth
30
- * @alias sl-remove-nth
31
- */
28
+ ///
29
+ /// @requires sl-remove-nth
30
+ /// @alias sl-remove-nth
31
+ ///
32
32
 
33
33
  @function sl-without-nth($list, $index) {
34
34
  @return sl-remove-nth($list, $index);
35
- }
35
+ }
@@ -1,19 +1,19 @@
1
- /**
2
- * Removes value(s) `$value` from `$list`.
3
- *
4
- * @ignore Documentation: http://sassylists.com/documentation.html#sl-remove
5
- *
6
- * @requires sl-replace
7
- *
8
- * @param {List} $list - list to update
9
- * @param {*} $value - value to remove
10
- *
11
- * @example
12
- * sl-remove(a b c, a)
13
- * // b c
14
- *
15
- * @return {List}
16
- */
1
+ ///
2
+ /// Removes value(s) `$value` from `$list`.
3
+ ///
4
+ /// @ignore Documentation: http://at-import.github.io/SassyLists/documentation/#function-sl-remove
5
+ ///
6
+ /// @requires sl-replace
7
+ ///
8
+ /// @param {List} $list - list to update
9
+ /// @param {*} $value - value to remove
10
+ ///
11
+ /// @example
12
+ /// sl-remove(a b c, a)
13
+ /// // b c
14
+ ///
15
+ /// @return {List}
16
+ ///
17
17
 
18
18
  @function sl-remove($list, $value) {
19
19
  @if sl-missing-dependencies(sl-replace) == true { @return null; }
@@ -21,11 +21,11 @@
21
21
  @return sl-replace($list, $value, null);
22
22
  }
23
23
 
24
- /**
25
- * @requires sl-remove
26
- * @alias sl-remove
27
- */
24
+ ///
25
+ /// @requires sl-remove
26
+ /// @alias sl-remove
27
+ ///
28
28
 
29
29
  @function sl-without($list, $value) {
30
30
  @return sl-remove($list, $value);
31
- }
31
+ }