SassyLists 2.0.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +44 -43
  3. data/README.md +73 -73
  4. data/lib/SassyLists.rb +21 -21
  5. data/stylesheets/SassyLists/_chunk.scss +41 -41
  6. data/stylesheets/SassyLists/_comma-list.scss +9 -0
  7. data/stylesheets/SassyLists/_contain.scss +17 -17
  8. data/stylesheets/SassyLists/_count-values.scss +18 -18
  9. data/stylesheets/SassyLists/_debug.scss +96 -96
  10. data/stylesheets/SassyLists/_every.scss +17 -17
  11. data/stylesheets/SassyLists/_explode.scss +52 -52
  12. data/stylesheets/SassyLists/_first.scss +23 -23
  13. data/stylesheets/SassyLists/_flatten.scss +35 -35
  14. data/stylesheets/SassyLists/_insert-nth.scss +48 -48
  15. data/stylesheets/SassyLists/_intersection.scss +30 -30
  16. data/stylesheets/SassyLists/_is-empty.scss +18 -0
  17. data/stylesheets/SassyLists/_is-symmetrical.scss +20 -20
  18. data/stylesheets/SassyLists/_last-index.scss +20 -20
  19. data/stylesheets/SassyLists/_last.scss +17 -17
  20. data/stylesheets/SassyLists/_loop.scss +37 -37
  21. data/stylesheets/SassyLists/_prepend.scss +22 -22
  22. data/stylesheets/SassyLists/_purge.scss +29 -29
  23. data/stylesheets/SassyLists/_random-value.scss +29 -29
  24. data/stylesheets/SassyLists/_remove-duplicates.scss +24 -24
  25. data/stylesheets/SassyLists/_remove-nth.scss +21 -21
  26. data/stylesheets/SassyLists/_remove.scss +22 -22
  27. data/stylesheets/SassyLists/_replace-nth.scss +26 -26
  28. data/stylesheets/SassyLists/_replace.scss +32 -32
  29. data/stylesheets/SassyLists/_reverse.scss +29 -29
  30. data/stylesheets/SassyLists/_shuffle.scss +30 -30
  31. data/stylesheets/SassyLists/_slice.scss +53 -53
  32. data/stylesheets/SassyLists/_some.scss +17 -17
  33. data/stylesheets/SassyLists/_sort.scss +42 -42
  34. data/stylesheets/SassyLists/_sum.scss +28 -28
  35. data/stylesheets/SassyLists/_tail.scss +20 -20
  36. data/stylesheets/SassyLists/_to-list.scss +18 -0
  37. data/stylesheets/SassyLists/_to-map.scss +50 -50
  38. data/stylesheets/SassyLists/_to-string.scss +25 -25
  39. data/stylesheets/SassyLists/_union.scss +24 -24
  40. data/stylesheets/SassyLists/_walk.scss +23 -23
  41. data/stylesheets/SassyLists/helpers/_missing-dependencies.scss +22 -22
  42. data/stylesheets/SassyLists/helpers/_str-compare.scss +27 -27
  43. data/stylesheets/SassyLists/helpers/_true.scss +10 -10
  44. data/stylesheets/_SassyLists.scss +45 -42
  45. metadata +8 -5
@@ -1,23 +1,23 @@
1
- // Checks whether `$functions` exist in global scope.
2
- //
3
- // @access private
4
- //
5
- // @param {ArgList} $functions - list of functions to check for
6
- //
7
- // @return {Bool} Whether or not there are missing dependencies
8
-
9
- @function sl-missing-dependencies($functions...) {
10
- $missing-dependencies: ();
11
-
12
- @each $function in $functions {
13
- @if not function-exists($function) {
14
- $missing-dependencies: append($missing-dependencies, $function, comma);
15
- }
16
- }
17
-
18
- @if length($missing-dependencies) > 0 {
19
- @warn "Unmet dependencies! The following functions are required: #{$missing-dependencies}.";
20
- }
21
-
22
- @return length($missing-dependencies) != 0;
1
+ // Checks whether `$functions` exist in global scope.
2
+ //
3
+ // @access private
4
+ //
5
+ // @param {ArgList} $functions - list of functions to check for
6
+ //
7
+ // @return {Bool} Whether or not there are missing dependencies
8
+
9
+ @function sl-missing-dependencies($functions...) {
10
+ $missing-dependencies: ();
11
+
12
+ @each $function in $functions {
13
+ @if not function-exists($function) {
14
+ $missing-dependencies: append($missing-dependencies, $function, comma);
15
+ }
16
+ }
17
+
18
+ @if length($missing-dependencies) > 0 {
19
+ @warn "Unmet dependencies! The following functions are required: #{$missing-dependencies}.";
20
+ }
21
+
22
+ @return length($missing-dependencies) != 0;
23
23
  }
@@ -1,28 +1,28 @@
1
- // Compares `$a` and `$b` based on `$order`.
2
- //
3
- // @access private
4
- //
5
- // @param {*} $a - first value
6
- // @param {*} $b - second value
7
- // @param {List} $matrix - alphabetical order
8
- //
9
- // @return {Bool}
10
-
11
- @function sl-str-compare($a, $b, $order) {
12
- @if type-of($a) == "number" and type-of($b) == "number" {
13
- @return $a < $b;
14
- }
15
-
16
- $a: to-lower-case($a + unquote(""));
17
- $b: to-lower-case($b + unquote(""));
18
-
19
- @for $i from 1 through min(str-length($a), str-length($b)) {
20
- $char-a: str-slice($a, $i, $i);
21
- $char-b: str-slice($b, $i, $i);
22
- @if $char-a and $char-b and index($order, $char-a) != index($order, $char-b) {
23
- @return index($order, $char-a) < index($order, $char-b);
24
- }
25
- }
26
-
27
- @return str-length($a) < str-length($b);
1
+ // Compares `$a` and `$b` based on `$order`.
2
+ //
3
+ // @access private
4
+ //
5
+ // @param {*} $a - first value
6
+ // @param {*} $b - second value
7
+ // @param {List} $matrix - alphabetical order
8
+ //
9
+ // @return {Bool}
10
+
11
+ @function sl-str-compare($a, $b, $order) {
12
+ @if type-of($a) == "number" and type-of($b) == "number" {
13
+ @return $a < $b;
14
+ }
15
+
16
+ $a: to-lower-case($a + unquote(""));
17
+ $b: to-lower-case($b + unquote(""));
18
+
19
+ @for $i from 1 through min(str-length($a), str-length($b)) {
20
+ $char-a: str-slice($a, $i, $i);
21
+ $char-b: str-slice($b, $i, $i);
22
+ @if $char-a and $char-b and index($order, $char-a) != index($order, $char-b) {
23
+ @return index($order, $char-a) < index($order, $char-b);
24
+ }
25
+ }
26
+
27
+ @return str-length($a) < str-length($b);
28
28
  }
@@ -1,11 +1,11 @@
1
- // Returns truthiness of `$value`.
2
- //
3
- // @access private
4
- //
5
- // @param {*} $value - value to check
6
- //
7
- // @return {Bool}
8
-
9
- @function sl-is-true($value) {
10
- @return if($value == null, false, $value and $value != null and $value != "" and $value != ());
1
+ // Returns truthiness of `$value`.
2
+ //
3
+ // @access private
4
+ //
5
+ // @param {*} $value - value to check
6
+ //
7
+ // @return {Bool}
8
+
9
+ @function sl-is-true($value) {
10
+ @return if($value == null, false, $value and $value != null and $value != "" and $value != ());
11
11
  }
@@ -1,42 +1,45 @@
1
- // SassyLists - A couple of advanced Sass list functions
2
- //
3
- // Official site: http://sassylists.com/
4
- // CodePen: http://codepen.io/HugoGiraudel/pen/loAgq
5
- // Repository: https://github.com/Team-Sass/SassyLists/
6
-
7
- @import "SassyLists/helpers/missing-dependencies";
8
- @import "SassyLists/helpers/str-compare";
9
- @import "SassyLists/helpers/true";
10
- @import "SassyLists/chunk";
11
- @import "SassyLists/contain";
12
- @import "SassyLists/count-values";
13
- @import "SassyLists/debug";
14
- @import "SassyLists/every";
15
- @import "SassyLists/explode";
16
- @import "SassyLists/first";
17
- @import "SassyLists/flatten";
18
- @import "SassyLists/insert-nth";
19
- @import "SassyLists/intersection";
20
- @import "SassyLists/is-symmetrical";
21
- @import "SassyLists/last";
22
- @import "SassyLists/last-index";
23
- @import "SassyLists/loop";
24
- @import "SassyLists/prepend";
25
- @import "SassyLists/purge";
26
- @import "SassyLists/random-value";
27
- @import "SassyLists/remove";
28
- @import "SassyLists/remove-duplicates";
29
- @import "SassyLists/remove-nth";
30
- @import "SassyLists/replace";
31
- @import "SassyLists/replace-nth";
32
- @import "SassyLists/reverse";
33
- @import "SassyLists/shuffle";
34
- @import "SassyLists/slice";
35
- @import "SassyLists/sort";
36
- @import "SassyLists/some";
37
- @import "SassyLists/sum";
38
- @import "SassyLists/tail";
39
- @import "SassyLists/to-map";
40
- @import "SassyLists/to-string";
41
- @import "SassyLists/union";
42
- @import "SassyLists/walk";
1
+ // SassyLists - A couple of advanced Sass list functions
2
+ //
3
+ // Official site: http://sassylists.com/
4
+ // CodePen: http://codepen.io/HugoGiraudel/pen/loAgq
5
+ // Repository: https://github.com/Team-Sass/SassyLists/
6
+
7
+ @import "SassyLists/helpers/missing-dependencies";
8
+ @import "SassyLists/helpers/str-compare";
9
+ @import "SassyLists/helpers/true";
10
+ @import "SassyLists/chunk";
11
+ @import "SassyLists/comma-list";
12
+ @import "SassyLists/contain";
13
+ @import "SassyLists/count-values";
14
+ @import "SassyLists/debug";
15
+ @import "SassyLists/every";
16
+ @import "SassyLists/explode";
17
+ @import "SassyLists/first";
18
+ @import "SassyLists/flatten";
19
+ @import "SassyLists/insert-nth";
20
+ @import "SassyLists/intersection";
21
+ @import "SassyLists/is-empty";
22
+ @import "SassyLists/is-symmetrical";
23
+ @import "SassyLists/last";
24
+ @import "SassyLists/last-index";
25
+ @import "SassyLists/loop";
26
+ @import "SassyLists/prepend";
27
+ @import "SassyLists/purge";
28
+ @import "SassyLists/random-value";
29
+ @import "SassyLists/remove";
30
+ @import "SassyLists/remove-duplicates";
31
+ @import "SassyLists/remove-nth";
32
+ @import "SassyLists/replace";
33
+ @import "SassyLists/replace-nth";
34
+ @import "SassyLists/reverse";
35
+ @import "SassyLists/shuffle";
36
+ @import "SassyLists/slice";
37
+ @import "SassyLists/sort";
38
+ @import "SassyLists/some";
39
+ @import "SassyLists/sum";
40
+ @import "SassyLists/tail";
41
+ @import "SassyLists/to-list";
42
+ @import "SassyLists/to-map";
43
+ @import "SassyLists/to-string";
44
+ @import "SassyLists/union";
45
+ @import "SassyLists/walk";
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: SassyLists
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hugo Giraudel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-30 00:00:00.000000000 Z
11
+ date: 2014-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sass
@@ -31,10 +31,12 @@ executables: []
31
31
  extensions: []
32
32
  extra_rdoc_files: []
33
33
  files:
34
- - CHANGELOG.md
35
34
  - README.md
35
+ - CHANGELOG.md
36
36
  - lib/SassyLists.rb
37
+ - stylesheets/_SassyLists.scss
37
38
  - stylesheets/SassyLists/_chunk.scss
39
+ - stylesheets/SassyLists/_comma-list.scss
38
40
  - stylesheets/SassyLists/_contain.scss
39
41
  - stylesheets/SassyLists/_count-values.scss
40
42
  - stylesheets/SassyLists/_debug.scss
@@ -44,6 +46,7 @@ files:
44
46
  - stylesheets/SassyLists/_flatten.scss
45
47
  - stylesheets/SassyLists/_insert-nth.scss
46
48
  - stylesheets/SassyLists/_intersection.scss
49
+ - stylesheets/SassyLists/_is-empty.scss
47
50
  - stylesheets/SassyLists/_is-symmetrical.scss
48
51
  - stylesheets/SassyLists/_last-index.scss
49
52
  - stylesheets/SassyLists/_last.scss
@@ -63,6 +66,7 @@ files:
63
66
  - stylesheets/SassyLists/_sort.scss
64
67
  - stylesheets/SassyLists/_sum.scss
65
68
  - stylesheets/SassyLists/_tail.scss
69
+ - stylesheets/SassyLists/_to-list.scss
66
70
  - stylesheets/SassyLists/_to-map.scss
67
71
  - stylesheets/SassyLists/_to-string.scss
68
72
  - stylesheets/SassyLists/_union.scss
@@ -70,7 +74,6 @@ files:
70
74
  - stylesheets/SassyLists/helpers/_missing-dependencies.scss
71
75
  - stylesheets/SassyLists/helpers/_str-compare.scss
72
76
  - stylesheets/SassyLists/helpers/_true.scss
73
- - stylesheets/_SassyLists.scss
74
77
  homepage: http://sassylists.com/
75
78
  licenses:
76
79
  - MIT
@@ -91,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
94
  version: 1.3.6
92
95
  requirements: []
93
96
  rubyforge_project: SassyLists
94
- rubygems_version: 2.2.2
97
+ rubygems_version: 2.0.14
95
98
  signing_key:
96
99
  specification_version: 4
97
100
  summary: A collection of powerful Sass (SCSS) functions to deal with your lists.