Travis build: 831
This commit is contained in:
23
README.md
23
README.md
@ -321,6 +321,7 @@ average(1, 2, 3);
|
||||
* [`inRange`](#inrange)
|
||||
* [`isDivisible`](#isdivisible)
|
||||
* [`isEven`](#iseven)
|
||||
* [`isNegativeZero`](#isnegativezero)
|
||||
* [`isPrime`](#isprime)
|
||||
* [`lcm`](#lcm)
|
||||
* [`luhnCheck`](#luhncheck-)
|
||||
@ -5675,6 +5676,28 @@ isEven(3); // false
|
||||
|
||||
<br>[⬆ Back to top](#contents)
|
||||
|
||||
### isNegativeZero
|
||||
|
||||
Checks if the given value is equal to negative zero (`-0`).
|
||||
|
||||
Checks whether a passed value is equal to `0` and if `1` divided by the value equals `-Infinity`.
|
||||
|
||||
```js
|
||||
const isNegativeZero = val => val === 0 && 1 / val === -Infinity;
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary>Examples</summary>
|
||||
|
||||
```js
|
||||
isNegativeZero(-0); // true
|
||||
isNegativeZero(0); // false
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<br>[⬆ Back to top](#contents)
|
||||
|
||||
### isPrime
|
||||
|
||||
Checks if the provided integer is a prime number.
|
||||
|
||||
Reference in New Issue
Block a user