lolite.floor 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 +22 -26
- package/{subtract.js → src/lib/subtract.js} +1 -1
- /package/{index.js → src/lib/floor.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,11 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
### floor(value)
|
|
1
|
+
## floor(value)
|
|
4
2
|
Round a number down to the nearest whole integer.
|
|
5
3
|
Non-finite or non-numeric values are coerced to zero.
|
|
6
4
|
|
|
7
5
|
```javascript
|
|
8
|
-
const
|
|
6
|
+
const lolite = require("lolite.floor")
|
|
9
7
|
const positiveResult = floor(2.1)
|
|
10
8
|
// result: 2
|
|
11
9
|
|
|
@@ -14,6 +12,5 @@ const negativeResult = floor(-2.1)
|
|
|
14
12
|
|
|
15
13
|
const coercedResult = floor("garbage")
|
|
16
14
|
// result: 0 (0 floored)
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
This utility is part of the [LoLite](https://github.com/enterprise-npm-ai/lolite) utility suite.
|
|
15
|
+
```
|
|
16
|
+
|
package/package.json
CHANGED
|
@@ -1,44 +1,40 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lolite.floor",
|
|
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/floor.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
|
+
"construct-new": "^2.0.4",
|
|
13
|
+
"while2": "^2.0.2",
|
|
14
|
+
"iszero": "^1.0.0",
|
|
15
|
+
"countingup": "^0.3.0",
|
|
16
|
+
"@10xly/strict-equals": "^1.0.0",
|
|
17
|
+
"subtract": "^0.0.3",
|
|
18
|
+
"@is-(unknown)/is-finite": "^1.0.0",
|
|
19
|
+
"pkg-with-failing-optional-dependency": "^1.0.1",
|
|
20
|
+
"@positive-numbers/zero": "^3.0.0",
|
|
21
|
+
"@positive-numbers/one": "^3.0.0",
|
|
22
|
+
"false-value": "^2.0.6",
|
|
21
23
|
"is-not-integer": "^1.0.2",
|
|
24
|
+
"immediate-error": "^7.1.0",
|
|
25
|
+
"core-js-pure": "^3.47.0",
|
|
22
26
|
"logtoconsole": "^1.0.7",
|
|
27
|
+
"lodash.multiply": "^4.9.0",
|
|
28
|
+
"integer-values": "^2.0.0",
|
|
23
29
|
"@not-js/not": "^1.1.0",
|
|
24
|
-
"es-logical-not-operator": "^1.0.0",
|
|
25
30
|
"is-integer": "^1.0.7",
|
|
26
|
-
"
|
|
31
|
+
"es-logical-not-operator": "^1.0.0",
|
|
27
32
|
"not-not": "^1.0.2",
|
|
28
33
|
"yanoop": "^1.0.0",
|
|
29
|
-
"
|
|
30
|
-
"@positive-numbers/one": "^3.0.0",
|
|
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
|
-
"es-intrinsic-cache": "^1.0.1",
|
|
34
|
+
"literally": "^1.0.0",
|
|
40
35
|
"is-not-negative": "^1.0.3",
|
|
41
36
|
"string-split": "^0.3.1",
|
|
42
|
-
"to-str": "^1.0.0"
|
|
37
|
+
"to-str": "^1.0.0",
|
|
38
|
+
"es-intrinsic-cache": "^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
|