Skip to content

Commit

Permalink
Merge branch 'master' of github.com:davidkpiano/sassdash
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkpiano committed Apr 12, 2018
2 parents 524c376 + 17b8382 commit df4a2bb
Show file tree
Hide file tree
Showing 124 changed files with 245 additions and 240 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ $uppercase-capitals: _map($capitals, to-upper-case);
```

## Running Tests
There are *over 700* unit tests. With node-sass, they usually take under 10 seconds to run. With Ruby Sass, they may take anywhere from 1 to 2 minutes.
There are *over 800* unit tests. With node-sass, they usually take under 10 seconds to run. With Ruby Sass, they may take anywhere from 1 to 2 minutes.

1. `cd path/to/sassdash`
2. [`bower install true`](https://github.com/ericam/true)
3. `true-cli tests/tests.scss`
2. `npm install`
3. `npm test`

## New Functions
Sassdash includes a number of helper functions not available in lodash, which include utility functions and implementations of native Javascript functions:
Expand Down
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@
"test": "tests"
},
"devDependencies": {
"node-sass": "3.3.3",
"sass-true": "^2.0.2",
"should": "^7.1.1"
"mocha": "^5.0.5",
"node-sass": "4.8.3",
"sass-true": "^4.0.0",
"should": "^13.2.1"
},
"peerDependencies": {
"node-sass": "^4.0.0"
},
"scripts": {
"test": "mocha tests/index.js",
Expand Down
4 changes: 2 additions & 2 deletions scss/api/_add.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@
/// // => 10
@function _add($args...) {
@return call('__add', $args...);
@return call(get-function('__add'), $args...);
}


/// @alias _add

@function \+($args...) {
@return call('__add', $args...);
@return call(get-function('__add'), $args...);
}
2 changes: 1 addition & 1 deletion scss/api/_after.scss
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,5 @@
/// }

@function _after($args...) {
@return call('__after', $args...);
@return call(get-function('__after'), $args...);
}
2 changes: 1 addition & 1 deletion scss/api/_ary.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@
/// // => (6, 8, 10)

@function _ary($args...) {
@return call('__ary', $args...);
@return call(get-function('__ary'), $args...);
}
4 changes: 2 additions & 2 deletions scss/api/_assign.scss
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,12 @@
/// // => ( 'user': 'barney', 'age': 36 )

@function _assign($args...) {
@return call('__assign', $args...);
@return call(get-function('__assign'), $args...);
}


/// @alias _assign

@function _extend($args...) {
@return call('__assign', $args...);
@return call(get-function('__assign'), $args...);
}
2 changes: 1 addition & 1 deletion scss/api/_at.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@
/// // => ('fred', 'pebbles')
@function _at($args...) {
@return call('__at', $args...);
@return call(get-function('__at'), $args...);
}
2 changes: 1 addition & 1 deletion scss/api/_before.scss
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,5 @@
/// }
/// }
@function _before($args...) {
@return call('__before', $args...);
@return call(get-function('__before'), $args...);
}
2 changes: 1 addition & 1 deletion scss/api/_bind.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@
/// $result: _exec($bound, '!');
/// // => 'hi fred!'
@function _bind($args...) {
@return call('__bind', $args...);
@return call(get-function('__bind'), $args...);
}
4 changes: 2 additions & 2 deletions scss/api/_callback.scss
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,9 @@
/// // => white
@function _callback($args...) {
@return call('__callback', $args...);
@return call(get-function('__callback'), $args...);
}

@function _iteratee($args...) {
@return call('__callback', $args...);
@return call(get-function('__callback'), $args...);
}
10 changes: 5 additions & 5 deletions scss/api/_case.scss
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
/// // => 'fooBar'
@function _camel-case($args...) {
@return call('__camel-case', $args...);
@return call(get-function('__camel-case'), $args...);
}


Expand All @@ -110,7 +110,7 @@
/// // => 'Fred'
@function _capitalize($args...) {
@return call('__capitalize', $args...);
@return call(get-function('__capitalize'), $args...);
}


Expand All @@ -132,7 +132,7 @@
/// // => 'foo-bar'
@function _kebab-case($args...) {
@return call('__kebab-case', $args...);
@return call(get-function('__kebab-case'), $args...);
}


Expand All @@ -153,7 +153,7 @@
/// // => 'foo_bar'
@function _snake-case($args...) {
@return call('__snake-case', $args...);
@return call(get-function('__snake-case'), $args...);
}


Expand All @@ -175,5 +175,5 @@
/// // => 'Foo Bar'
@function _start-case($args...) {
@return call('__start-case', $args...);
@return call(get-function('__start-case'), $args...);
}
2 changes: 1 addition & 1 deletion scss/api/_chunk.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@
/// // => (('a', 'b', 'c'), ('d',))
@function _chunk($args...) {
@return call('__chunk', $args...);
@return call(get-function('__chunk'), $args...);
}
2 changes: 1 addition & 1 deletion scss/api/_compact.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@
/// // => (1, 2, 3)
@function _compact($args...) {
@return call('__compact', $args...);
@return call(get-function('__compact'), $args...);
}
19 changes: 10 additions & 9 deletions scss/api/_compare.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@charset "UTF-8";

@function __lt($value, $other, $args...) {
@return __base-compare-ascending($value, $other) < 0;
Expand Down Expand Up @@ -48,14 +49,14 @@
/// // => false
@function _lt($args...) {
@return call('__lt', $args...);
@return call(get-function('__lt'), $args...);
}


/// @alias _lt

@function \<($args...) {
@return call('__lt', $args...);
@return call(get-function('__lt'), $args...);
}

///
Expand Down Expand Up @@ -88,14 +89,14 @@
/// // => true
@function _lte($args...) {
@return call('__lte', $args...);
@return call(get-function('__lte'), $args...);
}


/// @alias _lte

@function ≤($args...) {
@return call('__lte', $args...);
@return call(get-function('__lte'), $args...);
}


Expand Down Expand Up @@ -128,14 +129,14 @@
/// // => false
@function _gt($args...) {
@return call('__gt', $args...);
@return call(get-function('__gt'), $args...);
}


/// @alias _gt

@function \>($args...) {
@return call('__gt', $args...);
@return call(get-function('__gt'), $args...);
}


Expand Down Expand Up @@ -169,12 +170,12 @@
/// // => true
@function _gte($args...) {
@return call('__gte', $args...);
@return call(get-function('__gte'), $args...);
}


/// @alias _gte

@function ≥($args...) {
@return call('__gte', $args...);
}
@return call(get-function('__gte'), $args...);
}
4 changes: 2 additions & 2 deletions scss/api/_concat.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
/// $foo: _concat(1 2, 3, 4);
/// // => (1 2 3 4)
@function _concat($args...) {
@return call('__concat', $args...);
@return call(get-function('__concat'), $args...);
}

/// Combines the text of two or more strings and returns a new string.
Expand All @@ -58,5 +58,5 @@
/// $foo: _concat('Hello', ' ', 'World');
/// // => 'Hello World'
@function _str-concat($args...) {
@return call('__str-concat', $args...);
@return call(get-function('__str-concat'), $args...);
}
2 changes: 1 addition & 1 deletion scss/api/_constant.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@
/// $foo: _exec($getter) === $map;
/// // => true
@function _constant($args...) {
@return call('__constant', $args...);
@return call(get-function('__constant'), $args...);
}
4 changes: 2 additions & 2 deletions scss/api/_context.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ $__context__: () !global;


@function _context-get($args...) {
@return call('__context-get', $args...);
@return call(get-function('__context-get'), $args...);
}


@function _context-set($args...) {
@return call('__context-set', $args...);
@return call(get-function('__context-set'), $args...);
}
2 changes: 1 addition & 1 deletion scss/api/_count-by.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@
/// $foo: _count-by(('one', 'two', 'three'), 'str-length');
/// // => ( 3: 2, 5: 1 )
@function _count-by($args...) {
@return call('__count-by', $args...);
@return call(get-function('__count-by'), $args...);
}
2 changes: 1 addition & 1 deletion scss/api/_create.scss
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,5 @@
/// // todo
@function _create($args...) {
@return call('__create', $args...);
@return call(get-function('__create'), $args...);
}
2 changes: 1 addition & 1 deletion scss/api/_debug.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@
/// // DEBUG: three
/// // => 'one' 'two' 'three'
@function _debug($args...) {
@return call('__debug', $args...);
@return call(get-function('__debug'), $args...);
}
2 changes: 1 addition & 1 deletion scss/api/_defaults.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@
/// // => ( 'user': 'barney', 'age': 36 )
@function _defaults($args...) {
@return call('__defaults', $args...);
@return call(get-function('__defaults'), $args...);
}
2 changes: 1 addition & 1 deletion scss/api/_difference.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@
/// // => (1, 3)
@function _difference($args...) {
@return call('__difference', $args...);
@return call(get-function('__difference'), $args...);
}
8 changes: 4 additions & 4 deletions scss/api/_drop.scss
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
/// // => (1, 2, 3)
@function _drop($args...) {
@return call('__drop', $args...);
@return call(get-function('__drop'), $args...);
}


Expand All @@ -118,7 +118,7 @@
/// // => (1, 2, 3)
@function _drop-right($args...) {
@return call('__drop-right', $args...);
@return call(get-function('__drop-right'), $args...);
}


Expand Down Expand Up @@ -171,7 +171,7 @@
/// // => ('barney', 'fred', 'pebbles')

@function _drop-right-while($args...) {
@return call('__drop-right-while', $args...);
@return call(get-function('__drop-right-while'), $args...);
}


Expand Down Expand Up @@ -222,5 +222,5 @@
/// // => ('barney', 'fred', 'pebbles')

@function _drop-while($args...) {
@return call('__drop-while', $args...);
@return call(get-function('__drop-while'), $args...);
}
2 changes: 1 addition & 1 deletion scss/api/_either.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@
/// $foo: _either('hijkl', 'xyz', str-index 'abc');
/// // => 'xyz'
@function _either($args...) {
@return call('__either', $args...);
@return call(get-function('__either'), $args...);
}
2 changes: 1 addition & 1 deletion scss/api/_encode.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@
/// // => 'Hello%20world'
@function _encode($args...) {
@return call('__encode', $args...);
@return call(get-function('__encode'), $args...);
}
4 changes: 2 additions & 2 deletions scss/api/_ends-with.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
/// // => true
@function _ends-with($args...) {
@return call('__ends-with', $args...);
@return call(get-function('__ends-with'), $args...);
}

/// Checks if `$string` ends with any of the strings in `$targets` list.
Expand All @@ -72,5 +72,5 @@
/// // => true
@function _ends-with-any($args...) {
@return call('__ends-with-any', $args...);
@return call(get-function('__ends-with-any'), $args...);
}
2 changes: 1 addition & 1 deletion scss/api/_escape.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@
/// // => 'fred, barney, &amp; pebbles'
@function _escape($args...) {
@return call('__escape', $args...);
@return call(get-function('__escape'), $args...);
}
4 changes: 2 additions & 2 deletions scss/api/_every.scss
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@
/// // => false
@function _every($args...) {
@return call('__every', $args...);
@return call(get-function('__every'), $args...);
}

/// @alias _every

@function _all($args...) {
@return call('__every', $args...);
@return call(get-function('__every'), $args...);
}
Loading

0 comments on commit df4a2bb

Please sign in to comment.