Skip to content

Commit c71d976

Browse files
committed
Bumped 2.2.3
1 parent 83a3ac2 commit c71d976

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+290
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Changelog
22

3+
* `2.2.3`: adding examples to documentation
34
* `2.2.2`: fixing a bug with aliases for `sl-to-list()` and moved all comments to C-like
45
* `2.2.1`: improving `sl-to-list()`'s performance
56
* `2.2.0`:

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "SassyLists",
3-
"version": "2.2.2",
3+
"version": "2.2.3",
44
"homepage": "https://github.com/Team-Sass/SassyLists",
55
"authors": [
66
"Hugo Giraudel"

lib/SassyLists.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# Version is a number. If a version contains alphas, it will be created as a prerelease version
1616
# Date is in the form of YYYY-MM-DD
1717
module SassyLists
18-
VERSION = "2.2.2"
18+
VERSION = "2.2.3"
1919
DATE = "2014-07-05"
2020
end
2121

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "SassyLists",
3-
"version": "2.2.2",
3+
"version": "2.2.3",
44
"description": "A Sass API for lists.",
55
"scripts": {
66
"test": "grunt test"

stylesheets/SassyLists/_chunk.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
*
1111
* @requires sl-to-list
1212
*
13+
* @example
14+
* sl-chunk(a b c d e, 2)
15+
* // a b, c d, e
16+
*
1317
* @return {List | Null}
1418
*/
1519

stylesheets/SassyLists/_comma-list.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
*
44
* @ignore Documentation: http://sassylists.com/documentation.html#sl-comma-list
55
*
6+
* @example
7+
* sl-comma-list()
8+
* // ()
9+
*
610
* @return {List}
711
*/
812

stylesheets/SassyLists/_contain.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@
66
* @param {List} $list - list to check
77
* @param {*} $value - value to look for
88
*
9+
* @example
10+
* sl-contain(a b c, a)
11+
* // true
12+
*
13+
* @example
14+
* sl-contain(a b c, z)
15+
* // false
16+
*
917
* @return {Bool}
1018
*/
1119

stylesheets/SassyLists/_count-values.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
*
66
* @param {List} $list - list to count values from
77
*
8+
* @example
9+
* sl-count-values(a b c a)
10+
* // (a: 2, b: 1, c: 1)
11+
*
812
* @return {Map} Values mapped to their count
913
*/
1014

stylesheets/SassyLists/_debug.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
* @requires sl-is-single
1212
* @requires sl-has-multiple-values
1313
*
14+
* @example
15+
* sl-debug(a b c)
16+
* // '("a", "b", "c")'
17+
*
1418
* @return {String}
1519
*/
1620

stylesheets/SassyLists/_every.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@
77
* @param {String} $function - function to run against every item from list
88
* @param {ArgList} $args - extra arguments to pass to the function
99
*
10+
* @example
11+
* sl-every(1 2 3, unitless)
12+
* // true
13+
*
14+
* @example
15+
* sl-every(1 2 3px, unitless)
16+
* // false
17+
*
1018
* @return {Bool}
1119
*/
1220

stylesheets/SassyLists/_explode.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@
1010
* @throws $string is not a string for `sl-explode`.
1111
* @throws $delimiter is not a string for `sl-explode`.
1212
*
13+
* @example
14+
* sl-explode(abc)
15+
* // a b c
16+
*
17+
* @example
18+
* sl-explode(abc, b)
19+
* // a c
20+
*
1321
* @return {List | Null}
1422
*/
1523

stylesheets/SassyLists/_first.scss

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,18 @@
77
* @throws Cannot find first item of empty list.
88
*
99
* @requires sl-is-empty
10+
*
11+
* @example
12+
* sl-first(a b c)
13+
* // a
14+
*
15+
* @example
16+
* sl-first(a)
17+
* // a
18+
*
19+
* @example
20+
* sl-first(())
21+
* // null
1022
*
1123
* @return {*}
1224
*/

stylesheets/SassyLists/_flatten.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
* @param {List} $list - list to flatten
77
*
88
* @requires sl-has-multiple-values
9-
*
9+
*
10+
* @example
11+
* sl-flatten(a b c, d e f, g h i)
12+
* // a b c d e f g h i
13+
*
1014
* @return {List}
1115
*/
1216

stylesheets/SassyLists/_has-multiple-values.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@
55
*
66
* @param {List} $list - list to run test against
77
*
8+
* @example
9+
* sl-has-multiple-values(a)
10+
* // false
11+
*
12+
* @example
13+
* sl-has-multiple-values(a b)
14+
* // true
15+
*
816
* @return {Bool}
917
*/
1018

stylesheets/SassyLists/_has-values.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44
*
55
* @param {List} $list - list to run test against
66
*
7+
* @example
8+
* sl-has-values(a)
9+
* // true
10+
*
11+
* @example
12+
* sl-has-values(())
13+
* // false
14+
*
715
* @return {Bool}
816
*/
917

stylesheets/SassyLists/_insert-nth.scss

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,18 @@
1111
* @throws List index $index is not a number for `sl-insert-nth`.
1212
* @throws List index $index must be a non-zero integer for `sl-insert-nth`.
1313
*
14+
* @example
15+
* sl-insert-nth(a b c, 2, z)
16+
* // a z b c
17+
*
18+
* @example
19+
* sl-insert-nth(a b c, 42, z)
20+
* // a b c z
21+
*
22+
* @example
23+
* sl-insert-nth(a b c, -42, z)
24+
* // null
25+
*
1426
* @return {List | Null}
1527
*/
1628

stylesheets/SassyLists/_intersection.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
* @param {List} $list - first list
1010
* @param {ArgList} $lists - other lists
1111
*
12+
* @example
13+
* sl-intersection(a b c, b e d, a c b)
14+
* // b
15+
*
1216
* @return {List}
1317
*/
1418

stylesheets/SassyLists/_is-empty.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@
55
*
66
* @param {List} $list - list to run test against
77
*
8+
* @example
9+
* sl-is-empty(())
10+
* // true
11+
*
12+
* @example
13+
* sl-is-empty(a)
14+
* // false
15+
*
816
* @return {Bool}
917
*/
1018

stylesheets/SassyLists/_is-single.scss

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,18 @@
55
*
66
* @param {List} $list - list to run test against
77
*
8+
* @example
9+
* sl-is-single(())
10+
* // false
11+
*
12+
* @example
13+
* sl-is-single(a)
14+
* // true
15+
*
16+
* @example
17+
* sl-is-single(a b)
18+
* // false
19+
*
820
* @return {Bool}
921
*/
1022

stylesheets/SassyLists/_is-symmetrical.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@
77
*
88
* @param {List} $list - list to check
99
*
10+
* @example
11+
* sl-is-symmetrical(a b c)
12+
* // false
13+
*
14+
*
15+
* @example
16+
* sl-is-symmetrical(a b a)
17+
* // true
18+
*
1019
* @return {Bool}
1120
*/
1221

stylesheets/SassyLists/_last-index.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@
66
* @param {List} $list - list to search
77
* @param {*} $value - value to be searched for
88
*
9+
* @example
10+
* sl-last-index(a b a, a)
11+
* // 3
12+
*
13+
* @example
14+
* sl-last-index(a b a, z)
15+
* // null
16+
*
917
* @return {Number | Null}
1018
*/
1119

stylesheets/SassyLists/_last.scss

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,18 @@
88
* @throws Cannot find last item of empty list.
99
*
1010
* @requires sl-is-empty
11+
*
12+
* @example
13+
* sl-last(a b c)
14+
* // c
15+
*
16+
* @example
17+
* sl-last(a)
18+
* // a
19+
*
20+
* @example
21+
* sl-last(())
22+
* // null
1123
*
1224
* @return {*}
1325
*/

stylesheets/SassyLists/_loop.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,15 @@
1111
* @throws $value is not a number for `loop`.
1212
*
1313
* @requires sl-has-multiple-values
14+
*
15+
* @example
16+
* sl-loop(a b c)
17+
* // c a b
1418
*
19+
* @example
20+
* sl-loop(a b c, 2)
21+
* // b c a
22+
*
1523
* @return {List | Null}
1624
*/
1725

stylesheets/SassyLists/_prepend.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
* @param {List} $list - list to preprend value to
1010
* @param {*} $value - value to prepend to the list
1111
*
12+
* @example
13+
* sl-prepend(a b c, z)
14+
* // z a b c
15+
*
1216
* @return {List}
1317
*/
1418

stylesheets/SassyLists/_purge.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
*
88
* @param {List} $list - list to purge
99
*
10+
* @example
11+
* sl-purge(null a false b)
12+
* // a b
13+
*
1014
* @return {List}
1115
*/
1216

stylesheets/SassyLists/_random-value.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
* @throws Cannot find a random value in an empty list.
99
*
1010
* @requires sl-is-empty
11+
*
12+
* @example
13+
* sl-random-value(a b c)
14+
* // a
1115
*
1216
* @return {*}
1317
*/

stylesheets/SassyLists/_range.scss

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,18 @@
99
* @throws `$n` is not unitless for `sl-range`.
1010
* @throws `$n` is not greater than 0 for `sl-range`.
1111
*
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+
*
1224
* @return {List | Number | Null}
1325
*/
1426

stylesheets/SassyLists/_remove-duplicates.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
*
88
* @requires sl-to-list
99
*
10+
* @example
11+
* sl-remove-duplicates(a b a b)
12+
* // a b
13+
*
1014
* @return {List}
1115
*/
1216

stylesheets/SassyLists/_remove-nth.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@
88
* @param {List} $list - list to remove value from
99
* @param {Number} $index - index to remove
1010
*
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+
*
1119
* @return {List | Null}
1220
*/
1321

0 commit comments

Comments
 (0)