SassyLists 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +36 -36
- data/lib/SassyLists.rb +13 -13
- data/stylesheets/SassyLists/_chunk.scss +41 -41
- data/stylesheets/SassyLists/_contain.scss +17 -17
- data/stylesheets/SassyLists/_count-values.scss +18 -18
- data/stylesheets/SassyLists/_debug.scss +96 -96
- data/stylesheets/SassyLists/_explode.scss +49 -49
- data/stylesheets/SassyLists/_first.scss +23 -23
- data/stylesheets/SassyLists/_flatten.scss +35 -35
- data/stylesheets/SassyLists/_insert-nth.scss +46 -46
- data/stylesheets/SassyLists/_intersection.scss +28 -28
- data/stylesheets/SassyLists/_is-symmetrical.scss +18 -18
- data/stylesheets/SassyLists/_last-index.scss +20 -20
- data/stylesheets/SassyLists/_last.scss +17 -17
- data/stylesheets/SassyLists/_loop.scss +35 -35
- data/stylesheets/SassyLists/_prepend.scss +20 -20
- data/stylesheets/SassyLists/_purge.scss +27 -27
- data/stylesheets/SassyLists/_random-value.scss +29 -29
- data/stylesheets/SassyLists/_remove-duplicates.scss +24 -24
- data/stylesheets/SassyLists/_remove-nth.scss +19 -19
- data/stylesheets/SassyLists/_remove.scss +20 -20
- data/stylesheets/SassyLists/_replace-nth.scss +24 -24
- data/stylesheets/SassyLists/_replace.scss +29 -29
- data/stylesheets/SassyLists/_reverse.scss +29 -29
- data/stylesheets/SassyLists/_shuffle.scss +29 -29
- data/stylesheets/SassyLists/_slice.scss +48 -48
- data/stylesheets/SassyLists/_sort.scss +40 -40
- data/stylesheets/SassyLists/_sum.scss +28 -28
- data/stylesheets/SassyLists/_tail.scss +18 -18
- data/stylesheets/SassyLists/_to-string.scss +25 -25
- data/stylesheets/SassyLists/_union.scss +21 -21
- data/stylesheets/SassyLists/_walk.scss +23 -23
- data/stylesheets/SassyLists/helpers/_str-compare.scss +24 -24
- data/stylesheets/SassyLists/helpers/_true.scss +10 -10
- data/stylesheets/_SassyLists.scss +38 -38
- metadata +3 -3
@@ -1,24 +1,24 @@
|
|
1
|
-
// Apply $function to every item from $list passing $args as parameters
|
2
|
-
//
|
3
|
-
// @ignore Documentation: http://sassylists.com/documentation/#walk
|
4
|
-
//
|
5
|
-
// @param {List} $list - list to update
|
6
|
-
// @param {String} $function - function to call on each value
|
7
|
-
// @param {ArgList} $args - optional function arguments
|
8
|
-
//
|
9
|
-
// @throws There is no $function function.
|
10
|
-
//
|
11
|
-
// @return {List | Bool}
|
12
|
-
|
13
|
-
@function walk($list, $function, $args...) {
|
14
|
-
@if not function-exists($function) {
|
15
|
-
@warn "There is no `#{$function}` function.";
|
16
|
-
@return false;
|
17
|
-
}
|
18
|
-
|
19
|
-
@for $i from 1 through length($list) {
|
20
|
-
$list: set-nth($list, $i, call($function, nth($list, $i), $args...));
|
21
|
-
}
|
22
|
-
|
23
|
-
@return $list;
|
1
|
+
// Apply $function to every item from $list passing $args as parameters
|
2
|
+
//
|
3
|
+
// @ignore Documentation: http://sassylists.com/documentation/#walk
|
4
|
+
//
|
5
|
+
// @param {List} $list - list to update
|
6
|
+
// @param {String} $function - function to call on each value
|
7
|
+
// @param {ArgList} $args - optional function arguments
|
8
|
+
//
|
9
|
+
// @throws There is no $function function.
|
10
|
+
//
|
11
|
+
// @return {List | Bool}
|
12
|
+
|
13
|
+
@function walk($list, $function, $args...) {
|
14
|
+
@if not function-exists($function) {
|
15
|
+
@warn "There is no `#{$function}` function.";
|
16
|
+
@return false;
|
17
|
+
}
|
18
|
+
|
19
|
+
@for $i from 1 through length($list) {
|
20
|
+
$list: set-nth($list, $i, call($function, nth($list, $i), $args...));
|
21
|
+
}
|
22
|
+
|
23
|
+
@return $list;
|
24
24
|
}
|
@@ -1,25 +1,25 @@
|
|
1
|
-
// Compares two values based on alphabetical 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 str-compare($a, $b, $order) {
|
12
|
-
@if type-of($a) == "number" and type-of($b) == "number" {
|
13
|
-
@return $a < $b;
|
14
|
-
}
|
15
|
-
$a: to-lower-case($a + unquote(""));
|
16
|
-
$b: to-lower-case($b + unquote(""));
|
17
|
-
@for $i from 1 through min(str-length($a), str-length($b)) {
|
18
|
-
$char-a: str-slice($a, $i, $i);
|
19
|
-
$char-b: str-slice($b, $i, $i);
|
20
|
-
@if $char-a and $char-b and index($order, $char-a) != index($order, $char-b) {
|
21
|
-
@return index($order, $char-a) < index($order, $char-b);
|
22
|
-
}
|
23
|
-
}
|
24
|
-
@return str-length($a) < str-length($b);
|
1
|
+
// Compares two values based on alphabetical 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 str-compare($a, $b, $order) {
|
12
|
+
@if type-of($a) == "number" and type-of($b) == "number" {
|
13
|
+
@return $a < $b;
|
14
|
+
}
|
15
|
+
$a: to-lower-case($a + unquote(""));
|
16
|
+
$b: to-lower-case($b + unquote(""));
|
17
|
+
@for $i from 1 through min(str-length($a), str-length($b)) {
|
18
|
+
$char-a: str-slice($a, $i, $i);
|
19
|
+
$char-b: str-slice($b, $i, $i);
|
20
|
+
@if $char-a and $char-b and index($order, $char-a) != index($order, $char-b) {
|
21
|
+
@return index($order, $char-a) < index($order, $char-b);
|
22
|
+
}
|
23
|
+
}
|
24
|
+
@return str-length($a) < str-length($b);
|
25
25
|
}
|
@@ -1,11 +1,11 @@
|
|
1
|
-
// Returns truthiness of a value
|
2
|
-
//
|
3
|
-
// @access private
|
4
|
-
//
|
5
|
-
// @param {*} $value - value to check
|
6
|
-
//
|
7
|
-
// @return {Bool}
|
8
|
-
|
9
|
-
@function is-true($value) {
|
10
|
-
@return if($value == null, false, $value and $value != null and $value != "" and $value != ());
|
1
|
+
// Returns truthiness of a value
|
2
|
+
//
|
3
|
+
// @access private
|
4
|
+
//
|
5
|
+
// @param {*} $value - value to check
|
6
|
+
//
|
7
|
+
// @return {Bool}
|
8
|
+
|
9
|
+
@function is-true($value) {
|
10
|
+
@return if($value == null, false, $value and $value != null and $value != "" and $value != ());
|
11
11
|
}
|
@@ -1,38 +1,38 @@
|
|
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/true";
|
8
|
-
@import "SassyLists/helpers/str-compare";
|
9
|
-
@import "SassyLists/chunk";
|
10
|
-
@import "SassyLists/contain";
|
11
|
-
@import "SassyLists/count-values";
|
12
|
-
@import "SassyLists/debug";
|
13
|
-
@import "SassyLists/explode";
|
14
|
-
@import "SassyLists/first";
|
15
|
-
@import "SassyLists/flatten";
|
16
|
-
@import "SassyLists/insert-nth";
|
17
|
-
@import "SassyLists/intersection";
|
18
|
-
@import "SassyLists/is-symmetrical";
|
19
|
-
@import "SassyLists/last";
|
20
|
-
@import "SassyLists/last-index";
|
21
|
-
@import "SassyLists/loop";
|
22
|
-
@import "SassyLists/prepend";
|
23
|
-
@import "SassyLists/purge";
|
24
|
-
@import "SassyLists/random-value";
|
25
|
-
@import "SassyLists/remove";
|
26
|
-
@import "SassyLists/remove-duplicates";
|
27
|
-
@import "SassyLists/remove-nth";
|
28
|
-
@import "SassyLists/replace";
|
29
|
-
@import "SassyLists/replace-nth";
|
30
|
-
@import "SassyLists/reverse";
|
31
|
-
@import "SassyLists/shuffle";
|
32
|
-
@import "SassyLists/slice";
|
33
|
-
@import "SassyLists/sort";
|
34
|
-
@import "SassyLists/sum";
|
35
|
-
@import "SassyLists/tail";
|
36
|
-
@import "SassyLists/to-string";
|
37
|
-
@import "SassyLists/union";
|
38
|
-
@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/true";
|
8
|
+
@import "SassyLists/helpers/str-compare";
|
9
|
+
@import "SassyLists/chunk";
|
10
|
+
@import "SassyLists/contain";
|
11
|
+
@import "SassyLists/count-values";
|
12
|
+
@import "SassyLists/debug";
|
13
|
+
@import "SassyLists/explode";
|
14
|
+
@import "SassyLists/first";
|
15
|
+
@import "SassyLists/flatten";
|
16
|
+
@import "SassyLists/insert-nth";
|
17
|
+
@import "SassyLists/intersection";
|
18
|
+
@import "SassyLists/is-symmetrical";
|
19
|
+
@import "SassyLists/last";
|
20
|
+
@import "SassyLists/last-index";
|
21
|
+
@import "SassyLists/loop";
|
22
|
+
@import "SassyLists/prepend";
|
23
|
+
@import "SassyLists/purge";
|
24
|
+
@import "SassyLists/random-value";
|
25
|
+
@import "SassyLists/remove";
|
26
|
+
@import "SassyLists/remove-duplicates";
|
27
|
+
@import "SassyLists/remove-nth";
|
28
|
+
@import "SassyLists/replace";
|
29
|
+
@import "SassyLists/replace-nth";
|
30
|
+
@import "SassyLists/reverse";
|
31
|
+
@import "SassyLists/shuffle";
|
32
|
+
@import "SassyLists/slice";
|
33
|
+
@import "SassyLists/sort";
|
34
|
+
@import "SassyLists/sum";
|
35
|
+
@import "SassyLists/tail";
|
36
|
+
@import "SassyLists/to-string";
|
37
|
+
@import "SassyLists/union";
|
38
|
+
@import "SassyLists/walk";
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: SassyLists
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hugo Giraudel
|
@@ -47,7 +47,6 @@ extra_rdoc_files: []
|
|
47
47
|
files:
|
48
48
|
- CHANGELOG.md
|
49
49
|
- lib/SassyLists.rb
|
50
|
-
- stylesheets/_SassyLists.scss
|
51
50
|
- stylesheets/SassyLists/_chunk.scss
|
52
51
|
- stylesheets/SassyLists/_contain.scss
|
53
52
|
- stylesheets/SassyLists/_count-values.scss
|
@@ -80,6 +79,7 @@ files:
|
|
80
79
|
- stylesheets/SassyLists/_walk.scss
|
81
80
|
- stylesheets/SassyLists/helpers/_str-compare.scss
|
82
81
|
- stylesheets/SassyLists/helpers/_true.scss
|
82
|
+
- stylesheets/_SassyLists.scss
|
83
83
|
homepage: http://sassylists.com/
|
84
84
|
licenses: []
|
85
85
|
metadata: {}
|
@@ -99,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
99
99
|
version: 1.3.6
|
100
100
|
requirements: []
|
101
101
|
rubyforge_project: SassyLists
|
102
|
-
rubygems_version: 2.
|
102
|
+
rubygems_version: 2.2.2
|
103
103
|
signing_key:
|
104
104
|
specification_version: 4
|
105
105
|
summary: A collection of powerful Sass (SCSS) functions to deal with your lists.
|