Skip to content

Commit

Permalink
v1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fabioricali committed Jul 3, 2017
1 parent 50cf7ad commit ad645c1
Show file tree
Hide file tree
Showing 7 changed files with 80 additions and 72 deletions.
24 changes: 3 additions & 21 deletions dist/be.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// [AIV] beJS Build version: 1.1.3
// [AIV] beJS Build version: 1.2.0
var be =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
Expand Down Expand Up @@ -586,24 +586,6 @@ Helpers.getEditDistance = function (a, b) {
return matrix[b.length][a.length];
};

/**
* Returns the sign of a number, indicating whether the number is positive, negative or zero.
* @param x {number} number
* @returns {number}
*/
Helpers.mathSign = function (x) {
// If x is NaN, the result is NaN.
// If x is -0, the result is -0.
// If x is +0, the result is +0.
// If x is negative and not -0, the result is -1.
// If x is positive and not +0, the result is +1.
x = +x; // convert to a number
if (x === 0 || isNaN(x)) {
return Number(x);
}
return x > 0 ? 1 : -1;
};

module.exports = Helpers;

/***/ }),
Expand Down Expand Up @@ -948,7 +930,7 @@ module.exports = __webpack_require__(5);

var Helpers = __webpack_require__(2);
var Interface = __webpack_require__(0);
var version = '1.1.3';
var version = '1.2.0';

/**
* be class
Expand Down Expand Up @@ -2900,7 +2882,7 @@ module.exports = DOM;

module.exports = {
"name": "bejs",
"version": "1.1.3",
"version": "1.2.0",
"description": "Simple, light-weight assertions framework for javascript",
"main": "index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions dist/be.min.js

Large diffs are not rendered by default.

11 changes: 0 additions & 11 deletions docs/helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,6 @@ Distance between the two given strings
**Returns**: `*`


### helpers.mathSign(x)

Returns the sign of a number, indicating whether the number is positive, negative or zero.

**Parameters**

**x**: `number`, number

**Returns**: `number`



* * *

Expand Down
47 changes: 26 additions & 21 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ Check if is Android device **Interfaces**: `not` (in [..\src\asserts\envs.js](.



###[argument](types.md):
Check if is an arguments**Interfaces**: `all`, `any`, `not` (in [..\src\asserts\types.js](..\src\asserts\types.js))



###[array](types.md):
Check if is an array**Interfaces**: `all`, `any`, `not` (in [..\src\asserts\types.js](..\src\asserts\types.js))

Expand All @@ -33,7 +38,7 @@ Check if is base64 encoded string **Interfaces**: `all`, `any`, `not` (in [..\s


###[between](numbers.md):
Check if number is between min and max* **Interfaces**: `not` (in [..\src\asserts\numbers.js](..\src\asserts\numbers.js))
Check if number is between min and max**Interfaces**: `not` (in [..\src\asserts\numbers.js](..\src\asserts\numbers.js))



Expand Down Expand Up @@ -167,8 +172,13 @@ Checks if equal **Interfaces**: `not` (in [..\src\asserts\mixed.js](..\src\asse



###[error](types.md):
Check if is an error object**Interfaces**: `all`, `any`, `not` (in [..\src\asserts\types.js](..\src\asserts\types.js))



###[even](numbers.md):
Check if is a even number* **Interfaces**: `all`, `any`, `not` (in [..\src\asserts\numbers.js](..\src\asserts\numbers.js))
Check if is a even number**Interfaces**: `all`, `any`, `not` (in [..\src\asserts\numbers.js](..\src\asserts\numbers.js))



Expand All @@ -188,7 +198,7 @@ Check if is an IT fiscal code **Interfaces**: `all`, `any`, `not` (in [..\src\a


###[float](numbers.md):
Check if is float number* **Interfaces**: `all`, `any`, `not` (in [..\src\asserts\numbers.js](..\src\asserts\numbers.js))
Check if is float number**Interfaces**: `all`, `any`, `not` (in [..\src\asserts\numbers.js](..\src\asserts\numbers.js))



Expand Down Expand Up @@ -228,7 +238,7 @@ Get version of framework (in [..\src\be.js](..\src\be.js))


###[greater](numbers.md):
Checks if number is greater then an other* **Interfaces**: `not` (in [..\src\asserts\numbers.js](..\src\asserts\numbers.js))
Checks if number is greater then an other**Interfaces**: `not` (in [..\src\asserts\numbers.js](..\src\asserts\numbers.js))



Expand Down Expand Up @@ -263,22 +273,22 @@ Check if an element is in the array **Interfaces**: `not` (in [..\src\asserts\a


###[infinity](numbers.md):
Check if number is infinity* **Interfaces**: `all`, `any`, `not` (in [..\src\asserts\numbers.js](..\src\asserts\numbers.js))
Check if number is infinity**Interfaces**: `all`, `any`, `not` (in [..\src\asserts\numbers.js](..\src\asserts\numbers.js))



###[infinityNegative](numbers.md):
Check if number is infinity positive* **Interfaces**: `all`, `any`, `not` (in [..\src\asserts\numbers.js](..\src\asserts\numbers.js))
Check if number is infinity positive**Interfaces**: `all`, `any`, `not` (in [..\src\asserts\numbers.js](..\src\asserts\numbers.js))



###[infinityPositive](numbers.md):
Check if number is infinity positive* **Interfaces**: `all`, `any`, `not` (in [..\src\asserts\numbers.js](..\src\asserts\numbers.js))
Check if number is infinity positive**Interfaces**: `all`, `any`, `not` (in [..\src\asserts\numbers.js](..\src\asserts\numbers.js))



###[int](numbers.md):
Check if a number is integer* **Interfaces**: `all`, `any`, `not` (in [..\src\asserts\numbers.js](..\src\asserts\numbers.js))
Check if a number is integer**Interfaces**: `all`, `any`, `not` (in [..\src\asserts\numbers.js](..\src\asserts\numbers.js))



Expand Down Expand Up @@ -333,7 +343,7 @@ Check if is leap year **Interfaces**: `all`, `any`, `not` (in [..\src\asserts\d


###[lesser](numbers.md):
Checks if number is lesser then an other* **Interfaces**: `not` (in [..\src\asserts\numbers.js](..\src\asserts\numbers.js))
Checks if number is lesser then an other**Interfaces**: `not` (in [..\src\asserts\numbers.js](..\src\asserts\numbers.js))



Expand All @@ -357,11 +367,6 @@ Check if is a valid Mastercard credit card **Interfaces**: `all`, `any`, `not`



###[mathSign](helpers.md):
Returns the sign of a number, indicating whether the number is positive, negative or zero. (in [..\src\helpers.js](..\src\helpers.js))



###[md5](hashes.md):
Check if is a valid MD5 hash string**Interfaces**: `all`, `any`, `not` (in [..\src\asserts\hashes.js](..\src\asserts\hashes.js))

Expand All @@ -373,7 +378,7 @@ Check if date is month specified **Interfaces**: `not` (in [..\src\asserts\date


###[nan](numbers.md):
Check if is NaN* **Interfaces**: `all`, `any`, `not` (in [..\src\asserts\numbers.js](..\src\asserts\numbers.js))
Check if is NaN**Interfaces**: `all`, `any`, `not` (in [..\src\asserts\numbers.js](..\src\asserts\numbers.js))



Expand All @@ -383,12 +388,12 @@ Check if exists navigator object **Interfaces**: `not` (in [..\src\asserts\envs


###[negative](numbers.md):
Check if is a negative number* **Interfaces**: `all`, `any`, `not` (in [..\src\asserts\numbers.js](..\src\asserts\numbers.js))
Check if is a negative number**Interfaces**: `all`, `any`, `not` (in [..\src\asserts\numbers.js](..\src\asserts\numbers.js))



###[negativeZero](numbers.md):
Check if is negative zero (in [..\src\asserts\numbers.js](..\src\asserts\numbers.js))
Check if is negative zero**Interfaces**: `all`, `any`, `not` (in [..\src\asserts\numbers.js](..\src\asserts\numbers.js))



Expand All @@ -408,7 +413,7 @@ Check if number is in week, between 0 and 6 (in [..\src\asserts\dates.js](..\src


###[numeric](numbers.md):
Checks if is a number as string or number type* **Interfaces**: `all`, `any`, `not` (in [..\src\asserts\numbers.js](..\src\asserts\numbers.js))
Checks if is a number as string or number type**Interfaces**: `all`, `any`, `not` (in [..\src\asserts\numbers.js](..\src\asserts\numbers.js))



Expand All @@ -423,7 +428,7 @@ Convert object to string (in [..\src\helpers.js](..\src\helpers.js))


###[odd](numbers.md):
Check if is an odd number* **Interfaces**: `all`, `any`, `not` (in [..\src\asserts\numbers.js](..\src\asserts\numbers.js))
Check if is an odd number**Interfaces**: `all`, `any`, `not` (in [..\src\asserts\numbers.js](..\src\asserts\numbers.js))



Expand All @@ -443,12 +448,12 @@ Check if date is past **Interfaces**: `all`, `any`, `not` (in [..\src\asserts\d


###[positive](numbers.md):
Check if is a positive number* **Interfaces**: `all`, `any`, `not` (in [..\src\asserts\numbers.js](..\src\asserts\numbers.js))
Check if is a positive number**Interfaces**: `all`, `any`, `not` (in [..\src\asserts\numbers.js](..\src\asserts\numbers.js))



###[positiveZero](numbers.md):
Check if is negative zero (in [..\src\asserts\numbers.js](..\src\asserts\numbers.js))
Check if is negative zero**Interfaces**: `all`, `any`, `not` (in [..\src\asserts\numbers.js](..\src\asserts\numbers.js))



Expand Down
32 changes: 16 additions & 16 deletions docs/numbers.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Numbers checks.

### be.int(value)

Check if a number is integer* **Interfaces**: `all`, `any`, `not`
Check if a number is integer**Interfaces**: `all`, `any`, `not`

**Parameters**

Expand All @@ -24,7 +24,7 @@ be.int(2) // true be.int(1.5) // false be.all.int(1, 4, 5) // true

### be.float(value)

Check if is float number* **Interfaces**: `all`, `any`, `not`
Check if is float number**Interfaces**: `all`, `any`, `not`

**Parameters**

Expand All @@ -40,7 +40,7 @@ be.float(1.5) // true be.float(1) // false be.all.float(1.5, 4.2, 5) // false

### be.nan(value)

Check if is NaN* **Interfaces**: `all`, `any`, `not`
Check if is NaN**Interfaces**: `all`, `any`, `not`

**Parameters**

Expand All @@ -56,7 +56,7 @@ be.nan('s') // true

### be.even(value)

Check if is a even number* **Interfaces**: `all`, `any`, `not`
Check if is a even number**Interfaces**: `all`, `any`, `not`

**Parameters**

Expand All @@ -72,7 +72,7 @@ be.even(2) // true be.even(3) // false

### be.odd(value)

Check if is an odd number* **Interfaces**: `all`, `any`, `not`
Check if is an odd number**Interfaces**: `all`, `any`, `not`

**Parameters**

Expand All @@ -88,7 +88,7 @@ be.odd(3) // true be.odd(4) // false

### be.positive(value)

Check if is a positive number* **Interfaces**: `all`, `any`, `not`
Check if is a positive number**Interfaces**: `all`, `any`, `not`

**Parameters**

Expand All @@ -104,7 +104,7 @@ be.positive(2) // true be.positive(-3) // false

### be.negative(value)

Check if is a negative number* **Interfaces**: `all`, `any`, `not`
Check if is a negative number**Interfaces**: `all`, `any`, `not`

**Parameters**

Expand All @@ -120,7 +120,7 @@ be.negative(-2) // true be.negative(2) // false

### be.negativeZero(value)

Check if is negative zero
Check if is negative zero**Interfaces**: `all`, `any`, `not`

**Parameters**

Expand All @@ -136,7 +136,7 @@ be.negativeZero(-0) // true be.negativeZero(0) // false

### be.positiveZero(value)

Check if is negative zero
Check if is negative zero**Interfaces**: `all`, `any`, `not`

**Parameters**

Expand All @@ -152,7 +152,7 @@ be.positiveZero(+0) // true be.positiveZero(0) // true

### be.infinity(value)

Check if number is infinity* **Interfaces**: `all`, `any`, `not`
Check if number is infinity**Interfaces**: `all`, `any`, `not`

**Parameters**

Expand All @@ -168,7 +168,7 @@ be.infinity(1.7976931348623157E+10308) // true

### be.infinityPositive(value)

Check if number is infinity positive* **Interfaces**: `all`, `any`, `not`
Check if number is infinity positive**Interfaces**: `all`, `any`, `not`

**Parameters**

Expand All @@ -184,7 +184,7 @@ be.infinityPositive(1.7976931348623157E+10308) // true be.infinityPositive(-1.79

### be.infinityNegative(value)

Check if number is infinity positive* **Interfaces**: `all`, `any`, `not`
Check if number is infinity positive**Interfaces**: `all`, `any`, `not`

**Parameters**

Expand All @@ -200,7 +200,7 @@ be.infinityNegative(-1.7976931348623157E+10308) // true be.infinityNegative(1.79

### be.between(num, min, max)

Check if number is between min and max* **Interfaces**: `not`
Check if number is between min and max**Interfaces**: `not`

**Parameters**

Expand All @@ -220,7 +220,7 @@ be.between(4, 1, 10) // true

### be.greater(value, num)

Checks if number is greater then an other* **Interfaces**: `not`
Checks if number is greater then an other**Interfaces**: `not`

**Parameters**

Expand All @@ -238,7 +238,7 @@ be.greater(10, 5) // true be.greater(2, 8) // false

### be.lesser(value, num)

Checks if number is lesser then an other* **Interfaces**: `not`
Checks if number is lesser then an other**Interfaces**: `not`

**Parameters**

Expand All @@ -256,7 +256,7 @@ be.lesser(10, 5) // false be.lesser(2, 8) // true

### be.numeric(value)

Checks if is a number as string or number type* **Interfaces**: `all`, `any`, `not`
Checks if is a number as string or number type**Interfaces**: `all`, `any`, `not`

**Parameters**

Expand Down
Loading

0 comments on commit ad645c1

Please sign in to comment.