lolite.invert 1.1.8 → 1.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -7
- package/package.json +24 -28
- package/{subtract.js → src/lib/subtract.js} +1 -1
- /package/{index.js → src/lib/invert.js} +0 -0
- /package/{crash.js → src/private/crash.js} +0 -0
- /package/{isNotInteger.js → src/private/isNotInteger.js} +0 -0
- /package/{multiplyFallback.js → src/private/multiplyFallback.js} +0 -0
package/README.md
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
### invert(value)
|
|
1
|
+
## invert(value)
|
|
4
2
|
Inverts the sign of a value. Zero becomes negative zero.
|
|
5
3
|
Non-numeric values are coerced to zero.
|
|
6
4
|
Infinity is negated to -Infinity, and vice versa.
|
|
7
5
|
|
|
8
6
|
```javascript
|
|
9
|
-
const
|
|
7
|
+
const lolite = require("lolite.invert")
|
|
10
8
|
const inverted = invert(10)
|
|
11
9
|
// inverted: -10
|
|
12
10
|
|
|
@@ -18,6 +16,5 @@ const negativeInfinity = invert(Infinity)
|
|
|
18
16
|
|
|
19
17
|
const coercedNegative = invert("garbage")
|
|
20
18
|
// result: -0 (0 inverted)
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
This utility is part of the [LoLite](https://github.com/enterprise-npm-ai/lolite) utility suite.
|
|
19
|
+
```
|
|
20
|
+
|
package/package.json
CHANGED
|
@@ -1,44 +1,40 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lolite.invert",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"author": "10x'ly Made Software Ventures AB",
|
|
3
|
+
"version": "1.1.10",
|
|
4
|
+
"main": "src/lib/invert.js",
|
|
7
5
|
"license": "EGPSL10X-1.0",
|
|
6
|
+
"author": "10x'ly Made Software Ventures AB",
|
|
8
7
|
"repository": {
|
|
9
8
|
"type": "git",
|
|
10
9
|
"url": "git+https://github.com/enterprise-npm-ai/lolite.git"
|
|
11
10
|
},
|
|
12
|
-
"bugs": {
|
|
13
|
-
"url": "https://github.com/enterprise-npm-ai/lolite/issues"
|
|
14
|
-
},
|
|
15
|
-
"homepage": "https://github.com/enterprise-npm-ai/lolite#readme",
|
|
16
11
|
"dependencies": {
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
12
|
+
"@10xly/strict-equals": "^1.0.0",
|
|
13
|
+
"@is-(unknown)/is-finite": "^1.0.0",
|
|
14
|
+
"false-value": "^2.0.6",
|
|
15
|
+
"@positive-numbers/zero": "^3.0.0",
|
|
16
|
+
"is-negative-zero": "^2.0.3",
|
|
17
|
+
"positive-zero": "^3.0.0",
|
|
18
|
+
"add-two-numbers2": "^1.0.0",
|
|
19
|
+
"construct-new": "^2.0.4",
|
|
20
|
+
"while2": "^2.0.2",
|
|
21
|
+
"iszero": "^1.0.0",
|
|
22
|
+
"countingup": "^0.3.0",
|
|
23
|
+
"subtract": "^0.0.3",
|
|
24
|
+
"pkg-with-failing-optional-dependency": "^1.0.1",
|
|
25
|
+
"@positive-numbers/one": "^3.0.0",
|
|
21
26
|
"is-not-integer": "^1.0.2",
|
|
27
|
+
"immediate-error": "^7.1.0",
|
|
28
|
+
"core-js-pure": "^3.47.0",
|
|
22
29
|
"logtoconsole": "^1.0.7",
|
|
30
|
+
"lodash.multiply": "^4.9.0",
|
|
31
|
+
"integer-values": "^2.0.0",
|
|
23
32
|
"@not-js/not": "^1.1.0",
|
|
24
|
-
"es-logical-not-operator": "^1.0.0",
|
|
25
33
|
"is-integer": "^1.0.7",
|
|
26
|
-
"
|
|
34
|
+
"es-logical-not-operator": "^1.0.0",
|
|
27
35
|
"not-not": "^1.0.2",
|
|
28
36
|
"yanoop": "^1.0.0",
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"@positive-numbers/zero": "^3.0.0",
|
|
32
|
-
"construct-new": "^2.0.4",
|
|
33
|
-
"countingup": "^0.3.0",
|
|
34
|
-
"false-value": "^2.0.6",
|
|
35
|
-
"iszero": "^1.0.0",
|
|
36
|
-
"pkg-with-failing-optional-dependency": "^1.0.1",
|
|
37
|
-
"subtract": "^0.0.3",
|
|
38
|
-
"while2": "^2.0.2",
|
|
39
|
-
"add-two-numbers2": "^1.0.0",
|
|
40
|
-
"infinities": "^1.0.1",
|
|
41
|
-
"is-negative-zero": "^2.0.3",
|
|
42
|
-
"positive-zero": "^3.0.0"
|
|
37
|
+
"literally": "^1.0.0",
|
|
38
|
+
"infinities": "^1.0.1"
|
|
43
39
|
}
|
|
44
40
|
}
|
|
@@ -13,7 +13,7 @@ const number1 = require("@positive-numbers/one")
|
|
|
13
13
|
const falseValue = require("false-value"),
|
|
14
14
|
{ Counter } = countingup
|
|
15
15
|
|
|
16
|
-
const isNotInteger = require("
|
|
16
|
+
const isNotInteger = require("../private/isNotInteger")
|
|
17
17
|
|
|
18
18
|
function subtract(minuend, subtrahend) {
|
|
19
19
|
if (equal(isFinite(minuend), falseValue())) {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|