@thi.ng/transducers 8.0.7 → 8.0.8
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/CHANGELOG.md +8 -0
- package/README.md +1 -1
- package/curve.js +1 -1
- package/package.json +9 -9
- package/permutations.js +1 -1
- package/reduce.js +1 -1
- package/reverse.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [8.0.8](https://github.com/thi-ng/umbrella/compare/@thi.ng/transducers@8.0.7...@thi.ng/transducers@8.0.8) (2021-11-10)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @thi.ng/transducers
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [8.0.7](https://github.com/thi-ng/umbrella/compare/@thi.ng/transducers@8.0.6...@thi.ng/transducers@8.0.7) (2021-11-03)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @thi.ng/transducers
|
package/README.md
CHANGED
package/curve.js
CHANGED
|
@@ -40,7 +40,7 @@ export function* curve(start, end, steps = 10, rate = 0.1) {
|
|
|
40
40
|
const c = Math.exp(-Math.log((Math.abs(end - start) + rate) / rate) / steps);
|
|
41
41
|
const offset = (start < end ? end + rate : end - rate) * (1 - c);
|
|
42
42
|
steps > 0 && (yield start);
|
|
43
|
-
for (let x = start; --
|
|
43
|
+
for (let x = start; steps-- > 0;) {
|
|
44
44
|
yield (x = offset + x * c);
|
|
45
45
|
}
|
|
46
46
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/transducers",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.8",
|
|
4
4
|
"description": "Lightweight transducer implementations for ES6 / TypeScript",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -34,14 +34,14 @@
|
|
|
34
34
|
"test": "testament test"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@thi.ng/api": "^8.
|
|
38
|
-
"@thi.ng/arrays": "^2.0.
|
|
39
|
-
"@thi.ng/checks": "^3.0.
|
|
40
|
-
"@thi.ng/compare": "^2.0.
|
|
41
|
-
"@thi.ng/compose": "^2.0.
|
|
37
|
+
"@thi.ng/api": "^8.2.0",
|
|
38
|
+
"@thi.ng/arrays": "^2.0.8",
|
|
39
|
+
"@thi.ng/checks": "^3.0.7",
|
|
40
|
+
"@thi.ng/compare": "^2.0.8",
|
|
41
|
+
"@thi.ng/compose": "^2.0.8",
|
|
42
42
|
"@thi.ng/errors": "^2.0.6",
|
|
43
|
-
"@thi.ng/math": "^5.0.
|
|
44
|
-
"@thi.ng/random": "^3.1.
|
|
43
|
+
"@thi.ng/math": "^5.0.8",
|
|
44
|
+
"@thi.ng/random": "^3.1.4"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@thi.ng/testament": "^0.1.6"
|
|
@@ -559,5 +559,5 @@
|
|
|
559
559
|
],
|
|
560
560
|
"year": 2016
|
|
561
561
|
},
|
|
562
|
-
"gitHead": "
|
|
562
|
+
"gitHead": "5fe52419af63984ebe53032201b2a6174b9cb159"
|
|
563
563
|
}
|
package/permutations.js
CHANGED
|
@@ -56,7 +56,7 @@ export const permutationsN = (n, m = n, offsets) => {
|
|
|
56
56
|
illegalArgs(`insufficient offsets, got ${offsets.length}, needed ${n}`);
|
|
57
57
|
}
|
|
58
58
|
const seqs = [];
|
|
59
|
-
while (--
|
|
59
|
+
while (n-- > 0) {
|
|
60
60
|
const o = offsets ? offsets[n] : 0;
|
|
61
61
|
seqs[n] = range(o, o + m);
|
|
62
62
|
}
|
package/reduce.js
CHANGED
|
@@ -30,7 +30,7 @@ export function reduceRight(...args) {
|
|
|
30
30
|
args = parseArgs(args);
|
|
31
31
|
let acc = args[0] == null ? init() : args[0];
|
|
32
32
|
const xs = args[1];
|
|
33
|
-
for (let i = xs.length; --
|
|
33
|
+
for (let i = xs.length; i-- > 0;) {
|
|
34
34
|
acc = reduce(acc, xs[i]);
|
|
35
35
|
if (isReduced(acc)) {
|
|
36
36
|
acc = acc.deref();
|