@thi.ng/grid-iterators 4.0.142 → 4.0.144

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 CHANGED
@@ -7,7 +7,7 @@
7
7
  [![Mastodon Follow](https://img.shields.io/mastodon/follow/109331703950160316?domain=https%3A%2F%2Fmastodon.thi.ng&style=social)](https://mastodon.thi.ng/@toxi)
8
8
 
9
9
  > [!NOTE]
10
- > This is one of 210 standalone projects, maintained as part
10
+ > This is one of 211 standalone projects, maintained as part
11
11
  > of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
12
12
  > and anti-framework.
13
13
  >
package/clipping.js CHANGED
@@ -1,5 +1,5 @@
1
1
  function* clipped(src, left, top, right, bottom) {
2
- for (let p of src) {
2
+ for (const p of src) {
3
3
  if (p[0] >= left && p[0] < right && p[1] >= top && p[1] < bottom)
4
4
  yield p;
5
5
  }
package/diagonal-ends.js CHANGED
@@ -7,7 +7,7 @@ function* diagonalEnds2d(opts) {
7
7
  const maxY = rows - 1;
8
8
  const check = opts.all ? (i2) => i2 > 0 && i2 < num : () => true;
9
9
  let i = 0;
10
- for (let p of diagonal2d({ cols, rows })) {
10
+ for (const p of diagonal2d({ cols, rows })) {
11
11
  if (check(i)) {
12
12
  const [x, y] = p;
13
13
  if (x === 0 || x === maxX || y === 0 || y === maxY) yield tx(x, y);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/grid-iterators",
3
- "version": "4.0.142",
3
+ "version": "4.0.144",
4
4
  "description": "2D grid and shape iterators w/ multiple orderings",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -41,14 +41,14 @@
41
41
  "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
42
42
  },
43
43
  "dependencies": {
44
- "@thi.ng/api": "^8.12.8",
45
- "@thi.ng/arrays": "^2.14.1",
46
- "@thi.ng/binary": "^3.4.66",
47
- "@thi.ng/bitfield": "^2.4.20",
48
- "@thi.ng/errors": "^2.5.48",
49
- "@thi.ng/morton": "^3.1.130",
50
- "@thi.ng/random": "^4.1.33",
51
- "@thi.ng/transducers": "^9.6.17"
44
+ "@thi.ng/api": "^8.12.10",
45
+ "@thi.ng/arrays": "^2.14.3",
46
+ "@thi.ng/binary": "^3.4.68",
47
+ "@thi.ng/bitfield": "^2.4.22",
48
+ "@thi.ng/errors": "^2.5.50",
49
+ "@thi.ng/morton": "^3.1.132",
50
+ "@thi.ng/random": "^4.1.35",
51
+ "@thi.ng/transducers": "^9.6.19"
52
52
  },
53
53
  "devDependencies": {
54
54
  "esbuild": "^0.27.0",
@@ -168,5 +168,5 @@
168
168
  ],
169
169
  "year": 2019
170
170
  },
171
- "gitHead": "be6e7657b1e5c54d7d648d1b52888a7297e95a17\n"
171
+ "gitHead": "824bf9047b5a10f777c5c5b4aeecf0c750a22c75\n"
172
172
  }
package/random.js CHANGED
@@ -5,7 +5,7 @@ import { __opts } from "./utils.js";
5
5
  function* random2d(opts) {
6
6
  const { cols, rows, tx } = __opts(opts);
7
7
  const rnd = opts.rnd || SYSTEM;
8
- for (let i of shuffle([...range(cols * rows)], void 0, rnd)) {
8
+ for (const i of shuffle([...range(cols * rows)], void 0, rnd)) {
9
9
  yield tx(i % cols, i / cols | 0);
10
10
  }
11
11
  }