@thi.ng/grid-iterators 4.0.20 → 4.0.21

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**: 2023-09-06T13:36:28Z
3
+ - **Last updated**: 2023-10-11T10:05:08Z
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.
@@ -9,6 +9,12 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
9
9
  **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
10
10
  and/or version bumps of transitive dependencies.
11
11
 
12
+ ### [4.0.21](https://github.com/thi-ng/umbrella/tree/@thi.ng/grid-iterators@4.0.21) (2023-10-11)
13
+
14
+ #### ♻️ Refactoring
15
+
16
+ - minor update columns2d() ([7ecb207](https://github.com/thi-ng/umbrella/commit/7ecb207))
17
+
12
18
  # [4.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/grid-iterators@4.0.0) (2023-04-08)
13
19
 
14
20
  #### 🛑 Breaking changes
package/README.md CHANGED
@@ -241,7 +241,7 @@ For Node.js REPL:
241
241
  const gridIterators = await import("@thi.ng/grid-iterators");
242
242
  ```
243
243
 
244
- Package sizes (brotli'd, pre-treeshake): ESM: 2.57 KB
244
+ Package sizes (brotli'd, pre-treeshake): ESM: 2.58 KB
245
245
 
246
246
  ## Dependencies
247
247
 
package/columns.d.ts CHANGED
@@ -4,5 +4,5 @@ import type { GridIterOpts2D } from "./api.js";
4
4
  *
5
5
  * @param opts -
6
6
  */
7
- export declare const columns2d: (opts: GridIterOpts2D) => IterableIterator<import("./api.js").GridCoord2D>;
7
+ export declare const columns2d: (opts: GridIterOpts2D) => Generator<import("./api.js").GridCoord2D, void, unknown>;
8
8
  //# sourceMappingURL=columns.d.ts.map
package/columns.js CHANGED
@@ -1,5 +1,4 @@
1
- import { map } from "@thi.ng/transducers/map";
2
- import { range2d } from "@thi.ng/transducers/range2d";
1
+ import { repeatedly2d } from "@thi.ng/transducers/repeatedly2d";
3
2
  import { __opts } from "./utils.js";
4
3
  /**
5
4
  * Yields sequence of 2D grid coordinates in column-major order.
@@ -8,5 +7,5 @@ import { __opts } from "./utils.js";
8
7
  */
9
8
  export const columns2d = (opts) => {
10
9
  const { cols, rows, tx } = __opts(opts);
11
- return map((p) => tx(p[1], p[0]), range2d(rows | 0, cols | 0));
10
+ return repeatedly2d((y, x) => tx(x, y), rows | 0, cols | 0);
12
11
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/grid-iterators",
3
- "version": "4.0.20",
3
+ "version": "4.0.21",
4
4
  "description": "2D grid and shape iterators w/ multiple orderings",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -37,13 +37,13 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@thi.ng/api": "^8.9.5",
40
- "@thi.ng/arrays": "^2.6.0",
40
+ "@thi.ng/arrays": "^2.6.1",
41
41
  "@thi.ng/binary": "^3.3.33",
42
42
  "@thi.ng/bitfield": "^2.2.38",
43
43
  "@thi.ng/errors": "^2.3.5",
44
44
  "@thi.ng/morton": "^3.1.46",
45
- "@thi.ng/random": "^3.6.6",
46
- "@thi.ng/transducers": "^8.7.2"
45
+ "@thi.ng/random": "^3.6.7",
46
+ "@thi.ng/transducers": "^8.8.0"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@microsoft/api-extractor": "^7.36.4",
@@ -166,5 +166,5 @@
166
166
  ],
167
167
  "year": 2019
168
168
  },
169
- "gitHead": "10d8b3725e96c5d704c759489a89f132892b181e\n"
169
+ "gitHead": "e9f04908dc37ae9e29320f098d195f9f8445a1ad\n"
170
170
  }