@thi.ng/transducers 8.3.7 → 8.3.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2022-07-19T15:36:12Z
3
+ - **Last updated**: 2022-08-01T14:54:00Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
package/distinct.js CHANGED
@@ -10,7 +10,9 @@ export function distinct(...args) {
10
10
  return compR(rfn, key
11
11
  ? (acc, x) => {
12
12
  const k = key(x);
13
- return !seen.has(k) ? (seen.add(k), r(acc, x)) : acc;
13
+ return !seen.has(k)
14
+ ? (seen.add(k), r(acc, x))
15
+ : acc;
14
16
  }
15
17
  : (acc, x) => !seen.has(x) ? (seen.add(x), r(acc, x)) : acc);
16
18
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/transducers",
3
- "version": "8.3.7",
3
+ "version": "8.3.8",
4
4
  "description": "Lightweight transducer implementations for ES6 / TypeScript",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -34,18 +34,18 @@
34
34
  "test": "testament test"
35
35
  },
36
36
  "dependencies": {
37
- "@thi.ng/api": "^8.3.8",
38
- "@thi.ng/arrays": "^2.3.1",
39
- "@thi.ng/checks": "^3.2.2",
40
- "@thi.ng/compare": "^2.1.8",
41
- "@thi.ng/compose": "^2.1.8",
42
- "@thi.ng/errors": "^2.1.8",
43
- "@thi.ng/math": "^5.3.4",
44
- "@thi.ng/random": "^3.3.3"
37
+ "@thi.ng/api": "^8.3.9",
38
+ "@thi.ng/arrays": "^2.3.2",
39
+ "@thi.ng/checks": "^3.2.3",
40
+ "@thi.ng/compare": "^2.1.9",
41
+ "@thi.ng/compose": "^2.1.9",
42
+ "@thi.ng/errors": "^2.1.9",
43
+ "@thi.ng/math": "^5.3.5",
44
+ "@thi.ng/random": "^3.3.4"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@microsoft/api-extractor": "^7.25.0",
48
- "@thi.ng/testament": "^0.2.9",
48
+ "@thi.ng/testament": "^0.2.10",
49
49
  "rimraf": "^3.0.2",
50
50
  "tools": "^0.0.1",
51
51
  "typedoc": "^0.22.17",
@@ -567,5 +567,5 @@
567
567
  ],
568
568
  "year": 2016
569
569
  },
570
- "gitHead": "108a6357b77d457912d30681d7cc5603ae995209\n"
570
+ "gitHead": "976ccd698cedaa60dcef2e69030a5eb98898cc4a\n"
571
571
  }
package/str.js CHANGED
@@ -4,5 +4,7 @@ export function str(sep, xs) {
4
4
  let first = true;
5
5
  return xs
6
6
  ? [...xs].join(sep)
7
- : reducer(() => "", (acc, x) => ((acc = first ? acc + x : acc + sep + x), (first = false), acc));
7
+ : reducer(() => "", (acc, x) => ((acc = first ? acc + x : acc + sep + x),
8
+ (first = false),
9
+ acc));
8
10
  }
package/struct.js CHANGED
@@ -8,5 +8,5 @@ import { rename } from "./rename.js";
8
8
  export function struct(fields, src) {
9
9
  return isIterable(src)
10
10
  ? iterator(struct(fields), src)
11
- : comp(partitionOf(fields.map((f) => f[1])), partition(fields.length), rename(fields.map((f) => f[0])), mapKeys(fields.reduce((acc, f) => (f[2] ? ((acc[f[0]] = f[2]), acc) : acc), {}), false));
11
+ : comp(partitionOf(fields.map((f) => f[1])), partition(fields.length), rename(fields.map((f) => f[0])), mapKeys(fields.reduce((acc, f) => f[2] ? ((acc[f[0]] = f[2]), acc) : acc, {}), false));
12
12
  }