SassyBitwise 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bb3b64daed2bfc06498a4da5a3dca09d27a422d0
4
- data.tar.gz: 7f4e8d21885e229cda01dd981d546bda85a48e9a
3
+ metadata.gz: b82ee8e952de819d97e3e9d100d4023d23f2da61
4
+ data.tar.gz: 3ae28fe7d979975646d86bc9c0a1a12292b80a41
5
5
  SHA512:
6
- metadata.gz: d1518a2072ca0c2f2ffe2eeba7847301edd746c782e888f181cf11f87bc37a5b627b79d05377102e18aa472f211842fb0cd3d997f6833f12662695f519d55fda
7
- data.tar.gz: d15d5f8c4c3a56612c7fac5d7068dfa573294d65ebff9caf0ad30c88cc4b632620324c13cae8850d6786228c421e1020a920f50221bbb34a78b97b3bc2cb894a
6
+ metadata.gz: 7b0d9ed7bbd080f53e0602fd789772c6f98b4283d244ff19358b3cc4c6ae01cbd0bce9a3dfd7db8765c232535d6cf55e29eed9b4a1a4e796e7a52f772d5dd3a7
7
+ data.tar.gz: 456500ff5e3ed88fcc8d356ddcb3f4ab2d99cb651b88fbb75462352bf31dc8e96e9a4978624623ce6554b1d8af8bfa17064b44c38c867fa229b08ea9fd957d2d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,6 @@
1
- # Changelog
2
-
3
- * `1.0.1`: fixing important issue in `^`, `|` and `&`
4
- * `1.0.0`: stable API, gem release
5
- * `0.0.1`: initial commit
1
+ # Changelog
2
+
3
+ * `1.1.0`: new API accepting multiple bitwise operation simultaneously
4
+ * `1.0.1`: fixing important issue in `^`, `|` and `&`
5
+ * `1.0.0`: stable API, gem release
6
+ * `0.0.1`: initial commit
data/lib/SassyBitwise.rb CHANGED
@@ -1,14 +1,14 @@
1
- require 'compass'
2
- extension_path = File.expand_path(File.join(File.dirname(__FILE__), ".."))
3
- Compass::Frameworks.register('SassyBitwise', :path => extension_path)
4
-
5
- # Version is a number. If a version contains alphas, it will be created as a prerelease version
6
- # Date is in the form of YYYY-MM-DD
7
- module SassyBitwise
8
- VERSION = "1.0.1"
9
- DATE = "2014-06-04"
10
- end
11
-
12
- module Sass::Script::Functions
13
-
1
+ require 'compass'
2
+ extension_path = File.expand_path(File.join(File.dirname(__FILE__), ".."))
3
+ Compass::Frameworks.register('SassyBitwise', :path => extension_path)
4
+
5
+ # Version is a number. If a version contains alphas, it will be created as a prerelease version
6
+ # Date is in the form of YYYY-MM-DD
7
+ module SassyBitwise
8
+ VERSION = "1.1.0"
9
+ DATE = "2014-06-05"
10
+ end
11
+
12
+ module Sass::Script::Functions
13
+
14
14
  end
@@ -1,46 +1,67 @@
1
- // Bitwise helper function
2
- // ---
3
- // @param [list] $args: list of parameters
4
- // ---
5
- // @return [number]
6
- // ---
7
- @function bitwise($args) {
8
- @if not arguments-validator($args) {
9
- @return false;
10
- }
11
-
12
- // Handling not first
13
- @if nth($args, 1) == "~" {
14
- @return bw-not(nth($args, 2));
15
- }
16
-
17
- // Then all others
18
- $operator: to-lower-case(nth($args, 2));
19
- $x: nth($args, 1);
20
- $y: nth($args, 3);
21
-
22
- @if $operator == "^" {
23
- @return bw-xor($x, $y);
24
- }
25
-
26
- @else if $operator == "|" {
27
- @return bw-or($x, $y);
28
- }
29
-
30
- @else if $operator == "&" {
31
- @return bw-and($x, $y);
32
- }
33
-
34
- @else if $operator == "<<" {
35
- @return bw-shift-left($x, $y);
36
- }
37
-
38
- @else if $operator == ">>" {
39
- @return bw-shift-right($x, $y);
40
- }
41
-
42
- @else {
43
- @warn "Wrong operator `#{$operator}` for `bitwise` function.";
44
- @return false
45
- }
46
- }
1
+ // Bitwise helper function
2
+ // ---
3
+ // @param [list] $args: list of parameters
4
+ // ---
5
+ // @return [number]
6
+ // ---
7
+ @function bitwise($args) {
8
+ @if not arguments-validator($args) {
9
+ @return false;
10
+ }
11
+
12
+ $result: null;
13
+ $operator: null;
14
+ $not-operator: false;
15
+ $operators: (
16
+ '&' : 'and',
17
+ '|' : 'or',
18
+ '^' : 'xor',
19
+ '<<' : 'shift-left',
20
+ '>>' : 'shift-right'
21
+ );
22
+
23
+ // Loop through all arguments
24
+ @each $current in $args {
25
+
26
+ // If current argument is an operator
27
+ // Store it while waiting for next value
28
+ @if map-has-key($operators, $current) {
29
+ $operator: $current;
30
+ }
31
+
32
+ // If current argument is `not` bitwise operator
33
+ // Pass $not boolean to true
34
+ @else if $current == '~' {
35
+ $not-operator: true;
36
+ }
37
+
38
+ // If current argument is not an operator
39
+ @else {
40
+ // If $not is true
41
+ // Compute not first
42
+ @if $not-operator {
43
+ $current: bw-not($current);
44
+ $not-operator: false;
45
+ }
46
+
47
+ // Then the operation
48
+ @if $operator {
49
+ $result: call('bw-' + map-get($operators, $operator), $result, $current);
50
+ $operator: null;
51
+ }
52
+
53
+ @else {
54
+ $result: $current;
55
+ }
56
+ }
57
+ }
58
+
59
+ @return $result;
60
+ }
61
+
62
+
63
+ // Alias for `bitwise`
64
+ // ---
65
+ @function bw($args) {
66
+ @return bitwise($args);
67
+ }
@@ -1,9 +1,9 @@
1
- // Returns binary length
2
- // ---
3
- // @param [number] $value: value
4
- // ---
5
- // @return [number]
6
- // ---
7
- @function binary-length($value) {
8
- @return str-length(decimal-to-binary($value) + unquote(""))
9
- }
1
+ // Returns binary length
2
+ // ---
3
+ // @param [number] $value: value
4
+ // ---
5
+ // @return [number]
6
+ // ---
7
+ @function binary-length($value) {
8
+ @return str-length(decimal-to-binary($value) + unquote(""));
9
+ }
@@ -1,27 +1,27 @@
1
- // Convert from base 2 to base 10
2
- // ---
3
- // @param [number] $value: binary to convert
4
- // ---
5
- // @return [number]
6
- // ---
7
- @function binary-to-decimal($value) {
8
- $value: $value + unquote('');
9
- $result: if(str-slice($value, 1, 1) == "0", 0, 1);
10
-
11
- @for $i from 2 through str-length($value) {
12
- $c: str-slice($value, $i, $i);
13
-
14
- @if not index("0" "1", $c) {
15
- @warn "Not binary.";
16
- @return false
17
- }
18
-
19
- $result: $result * 2;
20
-
21
- @if $c == "1" {
22
- $result: $result + 1
23
- }
24
- }
25
-
26
- @return $result
27
- }
1
+ // Convert from base 2 to base 10
2
+ // ---
3
+ // @param [number] $value: binary to convert
4
+ // ---
5
+ // @return [number]
6
+ // ---
7
+ @function binary-to-decimal($value) {
8
+ $value: $value + unquote('');
9
+ $result: if(str-slice($value, 1, 1) == "0", 0, 1);
10
+
11
+ @for $i from 2 through str-length($value) {
12
+ $c: str-slice($value, $i, $i);
13
+
14
+ @if not index("0" "1", $c) {
15
+ @warn "Not binary.";
16
+ @return false;
17
+ }
18
+
19
+ $result: $result * 2;
20
+
21
+ @if $c == "1" {
22
+ $result: $result + 1;
23
+ }
24
+ }
25
+
26
+ @return $result;
27
+ }
@@ -1,24 +1,24 @@
1
- // Convert from base 10 to base 2
2
- // ---
3
- // @param [number] $value: decimal to convert
4
- // ---
5
- // @return [number]
6
- // ---
7
- @function decimal-to-binary($value) {
8
- $largest: largest-power-of-2($value);
9
- $result: 0;
10
-
11
- @while $largest >= 1 {
12
- @if $value - $largest >= 0 {
13
- $value: $value - $largest;
14
- $result: $result * 10 + 1
15
- }
16
- @else {
17
- $result: $result * 10
18
- }
19
-
20
- $largest: $largest / 2
21
- }
22
-
23
- @return $result
24
- }
1
+ // Convert from base 10 to base 2
2
+ // ---
3
+ // @param [number] $value: decimal to convert
4
+ // ---
5
+ // @return [number]
6
+ // ---
7
+ @function decimal-to-binary($value) {
8
+ $largest: largest-power-of-2($value);
9
+ $result: 0;
10
+
11
+ @while $largest >= 1 {
12
+ @if $value - $largest >= 0 {
13
+ $value: $value - $largest;
14
+ $result: $result * 10 + 1;
15
+ }
16
+ @else {
17
+ $result: $result * 10;
18
+ }
19
+
20
+ $largest: $largest / 2;
21
+ }
22
+
23
+ @return $result;
24
+ }
@@ -1,16 +1,16 @@
1
- // Returns largest power of 2 lesser than $value
2
- // ---
3
- // @param [number] $value: value
4
- // ---
5
- // @return [number]
6
- // ---
7
- @function largest-power-of-2($value) {
8
- $result: 1;
9
- @while $result <= $value {
10
- @if $result * 2 > $value {
11
- @return $result
12
- }
13
- $result: $result * 2
14
- }
15
- @return $result
16
- }
1
+ // Returns largest power of 2 lesser than $value
2
+ // ---
3
+ // @param [number] $value: value
4
+ // ---
5
+ // @return [number]
6
+ // ---
7
+ @function largest-power-of-2($value) {
8
+ $result: 1;
9
+ @while $result <= $value {
10
+ @if $result * 2 > $value {
11
+ @return $result;
12
+ }
13
+ $result: $result * 2;
14
+ }
15
+ @return $result;
16
+ }
@@ -1,15 +1,15 @@
1
- // Order arguments decreasing
2
- // ---
3
- // @param [number] $x: first value
4
- // @param [number] $y: second value
5
- // ---
6
- // @return [number]
7
- // ---
8
- @function order-args($x, $y) {
9
- @if $x >= $y {
10
- @return $x $y;
11
- }
12
- @else {
13
- @return $y $x;
14
- }
15
- }
1
+ // Order arguments decreasing
2
+ // ---
3
+ // @param [number] $x: first value
4
+ // @param [number] $y: second value
5
+ // ---
6
+ // @return [number]
7
+ // ---
8
+ @function order-args($x, $y) {
9
+ @if $x >= $y {
10
+ @return $x $y;
11
+ }
12
+ @else {
13
+ @return $y $x;
14
+ }
15
+ }
@@ -1,25 +1,27 @@
1
- // Power function
2
- // Using Compass if defined
3
- // ---
4
- // @param [number] $x: first value
5
- // @param [number] $y: second value
6
- // ---
7
- // @return [number]
8
- // ---
9
- @function power($x, $y) {
10
- @if function-exists('pow') == true {
11
- @return pow($x, $y)
12
- }
13
-
14
- $ret: 1;
15
- @if $y >= 0 {
16
- @for $i from 1 through $y {
17
- $ret: $ret * $x
18
- }
19
- } @else {
20
- @for $i from $y to 0 {
21
- $ret: $ret / $x
22
- }
23
- }
24
- @return $ret
25
- }
1
+ // Power function
2
+ // Using Compass if defined
3
+ // ---
4
+ // @param [number] $x: first value
5
+ // @param [number] $y: second value
6
+ // ---
7
+ // @return [number]
8
+ // ---
9
+ @function power($x, $y) {
10
+ @if function-exists('pow') == true {
11
+ @return pow($x, $y);
12
+ }
13
+
14
+ $ret: 1;
15
+
16
+ @if $y > 0 {
17
+ @for $i from 1 through $y {
18
+ $ret: $ret * $x;
19
+ }
20
+ } @else {
21
+ @for $i from $y to 0 {
22
+ $ret: $ret / $x;
23
+ }
24
+ }
25
+
26
+ @return $ret;
27
+ }
@@ -1,9 +1,9 @@
1
- // Returns sign of $x
2
- // ---
3
- // @param [number] $x: value
4
- // ---
5
- // @return [number]
6
- // ---
7
- @function sign($x) {
8
- @return if($x > 0, 1, if($x < 0, -1, 0))
9
- }
1
+ // Returns sign of $x
2
+ // ---
3
+ // @param [number] $x: value
4
+ // ---
5
+ // @return [number]
6
+ // ---
7
+ @function sign($x) {
8
+ @return if($x > 0, 1, if($x < 0, -1, 0));
9
+ }
@@ -1,22 +1,22 @@
1
- // `and` bitwise operator
2
- // $x & $y
3
- // ---
4
- // @param [number] $x: first value
5
- // @param [number] $y: second value
6
- // ---
7
- // @return [number]
8
- // ---
9
- @function bw-and($x, $y) {
10
- $args: order-args($x, $y);
11
- $x: nth($args, 1);
12
- $y: nth($args, 2);
13
- $b: binary-length($x);
14
- $res: 0;
15
-
16
- @for $i from 0 through $b {
17
- $h: power(2, $i);
18
- $res: $res + $h * (floor($x / $h) % 2) * (floor($y / $h) % 2)
19
- }
20
-
21
- @return $res
22
- }
1
+ // `and` bitwise operator
2
+ // $x & $y
3
+ // ---
4
+ // @param [number] $x: first value
5
+ // @param [number] $y: second value
6
+ // ---
7
+ // @return [number]
8
+ // ---
9
+ @function bw-and($x, $y) {
10
+ $args: order-args($x, $y);
11
+ $x: nth($args, 1);
12
+ $y: nth($args, 2);
13
+ $b: binary-length($x);
14
+ $res: 0;
15
+
16
+ @for $i from 0 through $b {
17
+ $h: power(2, $i);
18
+ $res: $res + $h * (floor($x / $h) % 2) * (floor($y / $h) % 2)
19
+ }
20
+
21
+ @return $res;
22
+ }
@@ -1,10 +1,10 @@
1
- // `not` bitwise operator
2
- // ~ $x
3
- // ---
4
- // @param [number] $x: value
5
- // ---
6
- // @return [number]
7
- // ---
8
- @function bw-not($x) {
9
- @return ($x + sign($x)) * -1
10
- }
1
+ // `not` bitwise operator
2
+ // ~ $x
3
+ // ---
4
+ // @param [number] $x: value
5
+ // ---
6
+ // @return [number]
7
+ // ---
8
+ @function bw-not($x) {
9
+ @return ($x + sign($x)) * -1;
10
+ }
@@ -1,24 +1,24 @@
1
- // `or` bitwise operator
2
- // $x | $y
3
- // ---
4
- // @param [number] $x: first value
5
- // @param [number] $y: second value
6
- // ---
7
- // @return [number]
8
- // ---
9
- @function bw-or($x, $y) {
10
- $args: order-args($x, $y);
11
- $x: nth($args, 1);
12
- $y: nth($args, 2);
13
- $b: binary-length($x);
14
- $res: 0;
15
-
16
- @for $i from 0 through $b {
17
- $h: power(2, $i);
18
- $tx: floor($x / $h) % 2;
19
- $ty: floor($y / $h) % 2;
20
- $res: $res + $h * (($tx + $ty + $tx * $ty % 2) % 2)
21
- }
22
-
23
- @return $res
24
- }
1
+ // `or` bitwise operator
2
+ // $x | $y
3
+ // ---
4
+ // @param [number] $x: first value
5
+ // @param [number] $y: second value
6
+ // ---
7
+ // @return [number]
8
+ // ---
9
+ @function bw-or($x, $y) {
10
+ $args: order-args($x, $y);
11
+ $x: nth($args, 1);
12
+ $y: nth($args, 2);
13
+ $b: binary-length($x);
14
+ $res: 0;
15
+
16
+ @for $i from 0 through $b {
17
+ $h: power(2, $i);
18
+ $tx: floor($x / $h) % 2;
19
+ $ty: floor($y / $h) % 2;
20
+ $res: $res + $h * (($tx + $ty + $tx * $ty % 2) % 2);
21
+ }
22
+
23
+ @return $res;
24
+ }
@@ -1,11 +1,11 @@
1
- // `<<` bitwise operator
2
- // $x << $y
3
- // ---
4
- // @param [number] $x: first value
5
- // @param [number] $y: second value
6
- // ---
7
- // @return [number]
8
- // ---
9
- @function bw-shift-left($x, $y) {
10
- @return $x * power(2, $y)
11
- }
1
+ // `<<` bitwise operator
2
+ // $x << $y
3
+ // ---
4
+ // @param [number] $x: first value
5
+ // @param [number] $y: second value
6
+ // ---
7
+ // @return [number]
8
+ // ---
9
+ @function bw-shift-left($x, $y) {
10
+ @return $x * power(2, $y);
11
+ }
@@ -1,11 +1,11 @@
1
- // `>>` bitwise operator
2
- // $x >> $y
3
- // ---
4
- // @param [number] $x: first value
5
- // @param [number] $y: second value
6
- // ---
7
- // @return [number]
8
- // ---
9
- @function bw-shift-right($x, $y) {
10
- @return floor($x / power(2, $y))
11
- }
1
+ // `>>` bitwise operator
2
+ // $x >> $y
3
+ // ---
4
+ // @param [number] $x: first value
5
+ // @param [number] $y: second value
6
+ // ---
7
+ // @return [number]
8
+ // ---
9
+ @function bw-shift-right($x, $y) {
10
+ @return floor($x / power(2, $y));
11
+ }
@@ -1,22 +1,22 @@
1
- // `xor` bitwise operator
2
- // $x ^ $y
3
- // ---
4
- // @param [number] $x: first value
5
- // @param [number] $y: second value
6
- // ---
7
- // @return [number]
8
- // ---
9
- @function bw-xor($x, $y) {
10
- $args: order-args($x, $y);
11
- $x: nth($args, 1);
12
- $y: nth($args, 2);
13
- $b: binary-length($x);
14
- $res: 0;
15
-
16
- @for $i from 0 through $b {
17
- $h: power(2, $i);
18
- $res: $res + $h * (((floor($x / $h) % 2) + (floor($y / $h) % 2)) % 2)
19
- }
20
-
21
- @return $res
22
- }
1
+ // `xor` bitwise operator
2
+ // $x ^ $y
3
+ // ---
4
+ // @param [number] $x: first value
5
+ // @param [number] $y: second value
6
+ // ---
7
+ // @return [number]
8
+ // ---
9
+ @function bw-xor($x, $y) {
10
+ $args: order-args($x, $y);
11
+ $x: nth($args, 1);
12
+ $y: nth($args, 2);
13
+ $b: binary-length($x);
14
+ $res: 0;
15
+
16
+ @for $i from 0 through $b {
17
+ $h: power(2, $i);
18
+ $res: $res + $h * (((floor($x / $h) % 2) + (floor($y / $h) % 2)) % 2);
19
+ }
20
+
21
+ @return $res;
22
+ }
@@ -1,45 +1,51 @@
1
- // Checks whether argument list is valid
2
- // ---
3
- // @param [list] $args: argument list
4
- // ---
5
- // @return [bool]
6
- // ---
7
- @function arguments-validator($args) {
8
- $valid-operators: "^", "|", "&", "<<", ">>";
9
-
10
- @if length($args) == 2 {
11
- @if nth($args, 1) != "~" {
12
- @warn "Only 2 arguments specified but first is not `~`.";
13
- @return false;
14
- }
15
-
16
- @if not is-number(nth($args, 2)) {
17
- @warn "Only 2 arguments specified but second is not a valid unitless number.";
18
- @return false;
19
- }
20
- }
21
-
22
- @else if length($args) == 3 {
23
- @if not index($valid-operators, nth($args, 2)) {
24
- @warn "Invalid operator: `#{nth($args, 2)}` given, one of #{inspect($valid-operators)} expected.";
25
- @return false;
26
- }
27
-
28
- @if not is-number(nth($args, 1)) {
29
- @warn "Invalid number as first argument: `#{nth($args, 1)} given, valid unitless number expected.";
30
- @return false;
31
- }
32
-
33
- @if not is-number(nth($args, 3)) {
34
- @warn "Invalid number as third argument: `#{nth($args, 3)} given, valid unitless number expected.";
35
- @return false;
36
- }
37
- }
38
-
39
- @else {
40
- @warn "Invalid number of arguments: #{length($args)} given, 2 or 3 expected.";
41
- @return false;
42
- }
43
-
44
- @return true;
45
- }
1
+ // Checks whether argument list is valid
2
+ // ---
3
+ // @param [list] $args: argument list
4
+ // ---
5
+ // @return [bool]
6
+ // ---
7
+ @function arguments-validator($args) {
8
+ $last: null;
9
+ $operators: (
10
+ '&' : 'and',
11
+ '|' : 'or',
12
+ '^' : 'xor',
13
+ '<<' : 'shift-left',
14
+ '>>' : 'shift-right'
15
+ );
16
+
17
+ @if length($args) < 2 {
18
+ @return false;
19
+ }
20
+
21
+ @each $current in $args {
22
+ @if map-has-key($operators, $current) {
23
+ @if not $last {
24
+ @warn "You can't start with another operator than `~`.";
25
+ @return false;
26
+ }
27
+ }
28
+
29
+ @else if $current == '~' {
30
+ @if type-of($last) == "number" {
31
+ @warn "Operator `~` can't follow a number.";
32
+ @return false;
33
+ }
34
+ }
35
+
36
+ @else if type-of($current) == "number" {
37
+ @if type-of($last) == "number" {
38
+ @warn "A number can't follow a number. They must be separated by an operator";
39
+ @return false;
40
+ }
41
+ }
42
+
43
+ @else {
44
+ @return false;
45
+ }
46
+
47
+ $last: $current;
48
+ }
49
+
50
+ @return true;
51
+ }
@@ -1,16 +1,15 @@
1
- @import "SassyBitwise/helpers/power";
2
- @import "SassyBitwise/helpers/sign";
3
- @import "SassyBitwise/helpers/order-args";
4
- @import "SassyBitwise/helpers/largest-power-of-2";
5
- @import "SassyBitwise/helpers/binary-to-decimal";
6
- @import "SassyBitwise/helpers/decimal-to-binary";
7
- @import "SassyBitwise/helpers/binary-length";
8
- @import "SassyBitwise/validators/is-number";
9
- @import "SassyBitwise/validators/arguments-validator";
10
- @import "SassyBitwise/operators/and";
11
- @import "SassyBitwise/operators/not";
12
- @import "SassyBitwise/operators/or";
13
- @import "SassyBitwise/operators/xor";
14
- @import "SassyBitwise/operators/shift-left";
15
- @import "SassyBitwise/operators/shift-right";
16
- @import "SassyBitwise/api/bitwise";
1
+ @import "SassyBitwise/helpers/order-args";
2
+ @import "SassyBitwise/helpers/power";
3
+ @import "SassyBitwise/helpers/sign";
4
+ @import "SassyBitwise/helpers/binary-to-decimal";
5
+ @import "SassyBitwise/helpers/decimal-to-binary";
6
+ @import "SassyBitwise/helpers/largest-power-of-2";
7
+ @import "SassyBitwise/helpers/binary-length";
8
+ @import "SassyBitwise/validators/arguments-validator";
9
+ @import "SassyBitwise/operators/or";
10
+ @import "SassyBitwise/operators/xor";
11
+ @import "SassyBitwise/operators/and";
12
+ @import "SassyBitwise/operators/not";
13
+ @import "SassyBitwise/operators/shift-left";
14
+ @import "SassyBitwise/operators/shift-right";
15
+ @import "SassyBitwise/api/bitwise";
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: SassyBitwise
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.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-04 00:00:00.000000000 Z
11
+ date: 2014-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sass
@@ -47,7 +47,6 @@ extra_rdoc_files: []
47
47
  files:
48
48
  - CHANGELOG.md
49
49
  - lib/SassyBitwise.rb
50
- - stylesheets/_SassyBitwise.scss
51
50
  - stylesheets/SassyBitwise/api/_bitwise.scss
52
51
  - stylesheets/SassyBitwise/helpers/_binary-length.scss
53
52
  - stylesheets/SassyBitwise/helpers/_binary-to-decimal.scss
@@ -63,7 +62,7 @@ files:
63
62
  - stylesheets/SassyBitwise/operators/_shift-right.scss
64
63
  - stylesheets/SassyBitwise/operators/_xor.scss
65
64
  - stylesheets/SassyBitwise/validators/_arguments-validator.scss
66
- - stylesheets/SassyBitwise/validators/_is-number.scss
65
+ - stylesheets/_SassyBitwise.scss
67
66
  homepage: http://github.com/HugoGiraudel/SassyBitwise
68
67
  licenses: []
69
68
  metadata: {}
@@ -83,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
83
82
  version: 1.3.6
84
83
  requirements: []
85
84
  rubyforge_project: SassyBitwise
86
- rubygems_version: 2.0.14
85
+ rubygems_version: 2.2.2
87
86
  signing_key:
88
87
  specification_version: 4
89
88
  summary: An implementation of bitwise operators in Sass without the use of Ruby.
@@ -1,9 +0,0 @@
1
- // Checks whether $value is valid number
2
- // ---
3
- // @param [number] $value
4
- // ---
5
- // @return [bool]
6
- // ---
7
- @function is-number($value) {
8
- @return type-of($value) == "number" and unitless($value)
9
- }