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,18 +1,18 @@
1
- /**
2
- * Returns the tail of `$list`: all items except the first (head).
3
- *
4
- * @ignore Documentation: http://sassylists.com/documentation.html#sl-tail
5
- *
6
- * @requires sl-slice
7
- *
8
- * @param {List} $list - list to retrieve tail from
9
- *
10
- * @example
11
- * sl-tail(a b c)
12
- * // b c
13
- *
14
- * @return {List | Null}
15
- */
1
+ ///
2
+ /// Returns the tail of `$list`: all items except the first (head).
3
+ ///
4
+ /// @ignore Documentation: http://at-import.github.io/SassyLists/documentation/#function-sl-tail
5
+ ///
6
+ /// @requires sl-slice
7
+ ///
8
+ /// @param {List} $list - list to retrieve tail from
9
+ ///
10
+ /// @example
11
+ /// sl-tail(a b c)
12
+ /// // b c
13
+ ///
14
+ /// @return {List | Null}
15
+ ///
16
16
 
17
17
  @function sl-tail($list) {
18
18
  @if sl-missing-dependencies(sl-slice) == true { @return null; }
@@ -20,11 +20,11 @@
20
20
  @return sl-slice($list, 2);
21
21
  }
22
22
 
23
- /**
24
- * @requires sl-tail
25
- * @alias sl-tail
26
- */
23
+ ///
24
+ /// @requires sl-tail
25
+ /// @alias sl-tail
26
+ ///
27
27
 
28
28
  @function sl-rest($list) {
29
29
  @return sl-tail($list);
30
- }
30
+ }
@@ -1,26 +1,26 @@
1
- /**
2
- * Casts `$value` into a list.
3
- *
4
- * @ignore Documentation: http://sassylists.com/documentation.html#sl-to-list
5
- *
6
- * @param {*} $value - value to cast to list
7
- * @param {String} $separator (space) - separator to use
8
- *
9
- * @example
10
- * sl-to-list(a b c, comma)
11
- * // a, b, c
12
- *
13
- * @return {List}
14
- */
1
+ ///
2
+ /// Casts `$value` into a list.
3
+ ///
4
+ /// @ignore Documentation: http://at-import.github.io/SassyLists/documentation/#function-sl-to-list
5
+ ///
6
+ /// @param {*} $value - value to cast to list
7
+ /// @param {String} $separator [space] - separator to use
8
+ ///
9
+ /// @example
10
+ /// sl-to-list(a b c, comma)
11
+ /// // a, b, c
12
+ ///
13
+ /// @return {List}
14
+ ///
15
15
 
16
16
  @function sl-to-list($value, $separator: list-separator($value)) {
17
17
  @return join((), $value, $separator);
18
18
  }
19
19
 
20
- /**
21
- * @requires sl-to-list
22
- * @alias sl-to-list
23
- */
20
+ ///
21
+ /// @requires sl-to-list
22
+ /// @alias sl-to-list
23
+ ///
24
24
 
25
25
  @function sl-listify($value) {
26
26
  @return sl-to-list($value);
@@ -1,26 +1,26 @@
1
- /**
2
- * Casts `$list` into a map, using indexes as keys (starting with `$start`).
3
- * Useful for iterating through a list with an index variable.
4
- * e.g. `@each $index, $value in to-map($list)`
5
- *
6
- * @author Andrey "Lolmaus" Mikhaylov
7
- * @author Chris Eppstein
8
- *
9
- * @ignore Documentation: http://sassylists.com/documentation.html#sl-to-map
10
- *
11
- * @param {List} $list - list to turn into map
12
- *
13
- * @requires sl-range
14
- * @requires sl-is-empty
15
- *
16
- * @throws List cannot be empty for `sl-to-map`.
17
- *
18
- * @example
19
- * sl-to-map(a b c)
20
- * // 1 a, 2 b, 3 c
21
- *
22
- * @return {Map | Null}
23
- */
1
+ ///
2
+ /// Casts `$list` into a map, using indexes as keys (starting with `$start`).
3
+ /// Useful for iterating through a list with an index variable.
4
+ /// e.g. `@each $index, $value in to-map($list)`
5
+ ///
6
+ /// @author Andrey "Lolmaus" Mikhaylov
7
+ /// @author Chris Eppstein
8
+ ///
9
+ /// @ignore Documentation: http://at-import.github.io/SassyLists/documentation/#function-sl-to-map
10
+ ///
11
+ /// @param {List} $list - list to turn into map
12
+ ///
13
+ /// @requires sl-range
14
+ /// @requires sl-is-empty
15
+ ///
16
+ /// @throws List cannot be empty for `sl-to-map`.
17
+ ///
18
+ /// @example
19
+ /// sl-to-map(a b c)
20
+ /// // 1 a, 2 b, 3 c
21
+ ///
22
+ /// @return {Map | Null}
23
+ ///
24
24
 
25
25
  @function sl-to-map($list) {
26
26
  @if sl-missing-dependencies(sl-range, sl-is-empty) == true { @return null; }
@@ -33,20 +33,20 @@
33
33
  @return zip(sl-range(length($list)), $list);
34
34
  }
35
35
 
36
- /**
37
- * @requires sl-to-map
38
- * @alias sl-to-map
39
- */
36
+ ///
37
+ /// @requires sl-to-map
38
+ /// @alias sl-to-map
39
+ ///
40
40
 
41
41
  @function sl-enumerate($list) {
42
42
  @return sl-to-map($list);
43
43
  }
44
44
 
45
- /**
46
- * @requires sl-to-map
47
- * @alias sl-to-map
48
- */
45
+ ///
46
+ /// @requires sl-to-map
47
+ /// @alias sl-to-map
48
+ ///
49
49
 
50
50
  @function sl-mapify($list) {
51
51
  @return sl-to-map($list);
52
- }
52
+ }
@@ -1,24 +1,24 @@
1
- /**
2
- * Joins all elements of `$list` with `$glue`.
3
- *
4
- * @ignore Documentation: http://sassylists.com/documentation.html#sl-to-string
5
- *
6
- * @param {List} $list - list to cast
7
- * @param {String} $glue ('') - value to use as a join string
8
- *
9
- * @requires sl-has-multiple-values
10
- * @requires sl-last
11
- *
12
- * @example
13
- * sl-to-string(a b c)
14
- * // abc
15
- *
16
- * @example
17
- * sl-to-string(a b c, '-')
18
- * // a-b-c
19
- *
20
- * @return {String}
21
- */
1
+ ///
2
+ /// Joins all elements of `$list` with `$glue`.
3
+ ///
4
+ /// @ignore Documentation: http://at-import.github.io/SassyLists/documentation/#function-sl-to-string
5
+ ///
6
+ /// @param {List} $list - list to cast
7
+ /// @param {String} $glue [''] - value to use as a join string
8
+ ///
9
+ /// @requires sl-has-multiple-values
10
+ /// @requires sl-last
11
+ ///
12
+ /// @example
13
+ /// sl-to-string(a b c)
14
+ /// // abc
15
+ ///
16
+ /// @example
17
+ /// sl-to-string(a b c, '-')
18
+ /// // a-b-c
19
+ ///
20
+ /// @return {String}
21
+ ///
22
22
 
23
23
  @function sl-to-string($list, $glue: '') {
24
24
  @if sl-missing-dependencies(sl-has-multiple-values) == true { @return null; }
@@ -36,11 +36,11 @@
36
36
  @return quote($result);
37
37
  }
38
38
 
39
- /**
40
- * @requires sl-to-string
41
- * @alias sl-to-string
42
- */
39
+ ///
40
+ /// @requires sl-to-string
41
+ /// @alias sl-to-string
42
+ ///
43
43
 
44
44
  @function sl-stringify($list, $glue: '') {
45
45
  @return sl-to-string($list, $glue);
46
- }
46
+ }
@@ -1,19 +1,19 @@
1
- /**
2
- * Returns a list of values from `$lists` minus duplicates.
3
- *
4
- * @ignore Documentation: http://sassylists.com/documentation.html#sl-union
5
- *
6
- * @requires sl-flatten
7
- * @requires sl-remove-duplicates
8
- *
9
- * @param {ArgList} $lists - lists to unify
10
- *
11
- * @example
12
- * sl-union(a b c, b e d, a c b)
13
- * // a b c e d
14
- *
15
- * @return {List}
16
- */
1
+ ///
2
+ /// Returns a list of values from `$lists` minus duplicates.
3
+ ///
4
+ /// @ignore Documentation: http://at-import.github.io/SassyLists/documentation/#function-sl-union
5
+ ///
6
+ /// @requires sl-flatten
7
+ /// @requires sl-remove-duplicates
8
+ ///
9
+ /// @param {ArgList} $lists - lists to unify
10
+ ///
11
+ /// @example
12
+ /// sl-union(a b c, b e d, a c b)
13
+ /// // a b c e d
14
+ ///
15
+ /// @return {List}
16
+ ///
17
17
 
18
18
  @function sl-union($lists...) {
19
19
  @if sl-missing-dependencies(sl-flatten, sl-remove-duplicates) == true { @return null; }
@@ -23,10 +23,10 @@
23
23
  @return $result;
24
24
  }
25
25
 
26
- /**
27
- * @requires sl-union
28
- * @alias sl-union
29
- */
26
+ ///
27
+ /// @requires sl-union
28
+ /// @alias sl-union
29
+ ///
30
30
 
31
31
  @function sl-merge($lists...) {
32
32
  @return sl-union($lists...);
@@ -1,23 +1,23 @@
1
- /**
2
- * Apply `$function` to every item from `$list` passing $args as parameters.
3
- *
4
- * @ignore Documentation: http://sassylists.com/documentation.html#sl-walk
5
- *
6
- * @param {List} $list - list to update
7
- * @param {String} $function - function to call on each value
8
- * @param {ArgList} $args - optional function arguments
9
- *
10
- * @throws There is no `$function` function for `sl-walk`.
11
- *
12
- * @requires sl-to-map
13
- * @requires sl-to-list
14
- *
15
- * @example
16
- * sl-walk(a b c, to-upper-case)
17
- * // A B C
18
- *
19
- * @return {List | Null}
20
- */
1
+ ///
2
+ /// Apply `$function` to every item from `$list` passing $args as parameters.
3
+ ///
4
+ /// @ignore Documentation: http://at-import.github.io/SassyLists/documentation/#function-sl-walk
5
+ ///
6
+ /// @param {List} $list - list to update
7
+ /// @param {String} $function - function to call on each value
8
+ /// @param {ArgList} $args - optional function arguments
9
+ ///
10
+ /// @throws There is no `$function` function for `sl-walk`.
11
+ ///
12
+ /// @requires sl-to-map
13
+ /// @requires sl-to-list
14
+ ///
15
+ /// @example
16
+ /// sl-walk(a b c, to-upper-case)
17
+ /// // A B C
18
+ ///
19
+ /// @return {List | Null}
20
+ ///
21
21
 
22
22
  @function sl-walk($list, $function, $args...) {
23
23
  @if sl-missing-dependencies(sl-to-map, sl-to-list) == true { @return null; }
@@ -32,4 +32,4 @@
32
32
  }
33
33
 
34
34
  @return sl-to-list($list);
35
- }
35
+ }
@@ -1,13 +1,13 @@
1
- /**
2
- * Check whether value is a number
3
- *
4
- * @access private
5
- *
6
- * @param {*} $value - value to run test against
7
- *
8
- * @return {Bool}
9
- */
1
+ ///
2
+ /// Check whether value is a number
3
+ ///
4
+ /// @access private
5
+ ///
6
+ /// @param {*} $value - value to run test against
7
+ ///
8
+ /// @return {Bool}
9
+ ///
10
10
 
11
11
  @function sl-is-number($value) {
12
12
  @return type-of($value) == "number";
13
- }
13
+ }
@@ -1,12 +1,12 @@
1
- /**
2
- * Checks whether `$functions` exist in global scope.
3
- *
4
- * @access private
5
- *
6
- * @param {ArgList} $functions - list of functions to check for
7
- *
8
- * @return {Bool} Whether or not there are missing dependencies
9
- */
1
+ ///
2
+ /// Checks whether `$functions` exist in global scope.
3
+ ///
4
+ /// @access private
5
+ ///
6
+ /// @param {ArgList} $functions - list of functions to check for
7
+ ///
8
+ /// @return {Bool} Whether or not there are missing dependencies
9
+ ///
10
10
 
11
11
  @function sl-missing-dependencies($functions...) {
12
12
  $missing-dependencies: ();
@@ -22,4 +22,4 @@
22
22
  }
23
23
 
24
24
  @return length($missing-dependencies) != 0;
25
- }
25
+ }
@@ -1,14 +1,14 @@
1
- /**
2
- * Compares `$a` and `$b` based on `$order`.
3
- *
4
- * @access private
5
- *
6
- * @param {*} $a - first value
7
- * @param {*} $b - second value
8
- * @param {List} $matrix - alphabetical order
9
- *
10
- * @return {Bool}
11
- */
1
+ ///
2
+ /// Compares `$a` and `$b` based on `$order`.
3
+ ///
4
+ /// @access private
5
+ ///
6
+ /// @param {*} $a - first value
7
+ /// @param {*} $b - second value
8
+ /// @param {List} $matrix - alphabetical order
9
+ ///
10
+ /// @return {Bool}
11
+ ///
12
12
 
13
13
  @function sl-str-compare($a, $b, $order) {
14
14
  @if type-of($a) == "number" and type-of($b) == "number" {
@@ -27,4 +27,4 @@
27
27
  }
28
28
 
29
29
  @return str-length($a) < str-length($b);
30
- }
30
+ }
@@ -1,13 +1,13 @@
1
- /**
2
- * Returns truthiness of `$value`.
3
- *
4
- * @access private
5
- *
6
- * @param {*} $value - value to check
7
- *
8
- * @return {Bool}
9
- */
1
+ ///
2
+ /// Returns truthiness of `$value`.
3
+ ///
4
+ /// @access private
5
+ ///
6
+ /// @param {*} $value - value to check
7
+ ///
8
+ /// @return {Bool}
9
+ ///
10
10
 
11
11
  @function sl-is-true($value) {
12
12
  @return if($value == null, false, $value and $value != null and $value != "" and $value != ());
13
- }
13
+ }