@thi.ng/grid-iterators 4.0.53 → 4.0.55

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**: 2024-02-22T11:59:16Z
3
+ - **Last updated**: 2024-02-25T14:07:53Z
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.54](https://github.com/thi-ng/umbrella/tree/@thi.ng/grid-iterators@4.0.54) (2024-02-22)
13
+
14
+ #### ♻️ Refactoring
15
+
16
+ - update object destructuring in all pkgs & examples ([f36aeb0](https://github.com/thi-ng/umbrella/commit/f36aeb0))
17
+
12
18
  ### [4.0.30](https://github.com/thi-ng/umbrella/tree/@thi.ng/grid-iterators@4.0.30) (2023-11-09)
13
19
 
14
20
  #### ♻️ Refactoring
package/README.md CHANGED
@@ -256,7 +256,7 @@ For Node.js REPL:
256
256
  const gridIterators = await import("@thi.ng/grid-iterators");
257
257
  ```
258
258
 
259
- Package sizes (brotli'd, pre-treeshake): ESM: 2.61 KB
259
+ Package sizes (brotli'd, pre-treeshake): ESM: 2.58 KB
260
260
 
261
261
  ## Dependencies
262
262
 
@@ -13,6 +13,8 @@ export interface DiagonalSlopeOpts extends GridIterOpts2D {
13
13
  *
14
14
  * @example
15
15
  * ```ts
16
+ * import { diagonalSlopeY } from "@thi.ng/grid-iterators";
17
+ *
16
18
  * // iterate grid in diagonals of 1:3 ratio (x:y)
17
19
  * [...diagonalSlopeY({ cols: 5, step: 3 })]
18
20
  * // [
@@ -9,6 +9,8 @@
9
9
  *
10
10
  * @example
11
11
  * ```ts
12
+ * import { diamondSquare } from "@thi.ng/grid-iterators";
13
+ *
12
14
  * // generate coords for a 17x17 grid
13
15
  * [...diamondSquare(4)]
14
16
  * // [
package/flood-fill.d.ts CHANGED
@@ -12,6 +12,8 @@ import type { Predicate2 } from "@thi.ng/api";
12
12
  *
13
13
  * @example
14
14
  * ```ts
15
+ * import { floodFill } from "@thi.ng/grid-iterators";
16
+ *
15
17
  * const img = [
16
18
  * 1,0,1,0,
17
19
  * 0,0,0,0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/grid-iterators",
3
- "version": "4.0.53",
3
+ "version": "4.0.55",
4
4
  "description": "2D grid and shape iterators w/ multiple orderings",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -37,14 +37,14 @@
37
37
  "tool:assets": "bun tools/build-assets.ts"
38
38
  },
39
39
  "dependencies": {
40
- "@thi.ng/api": "^8.9.25",
41
- "@thi.ng/arrays": "^2.8.2",
42
- "@thi.ng/binary": "^3.4.14",
43
- "@thi.ng/bitfield": "^2.3.24",
40
+ "@thi.ng/api": "^8.9.26",
41
+ "@thi.ng/arrays": "^2.8.3",
42
+ "@thi.ng/binary": "^3.4.15",
43
+ "@thi.ng/bitfield": "^2.3.25",
44
44
  "@thi.ng/errors": "^2.4.18",
45
- "@thi.ng/morton": "^3.1.73",
46
- "@thi.ng/random": "^3.6.32",
47
- "@thi.ng/transducers": "^8.9.5"
45
+ "@thi.ng/morton": "^3.1.74",
46
+ "@thi.ng/random": "^3.6.33",
47
+ "@thi.ng/transducers": "^8.9.7"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@microsoft/api-extractor": "^7.40.1",
@@ -166,5 +166,5 @@
166
166
  ],
167
167
  "year": 2019
168
168
  },
169
- "gitHead": "4513a1c703bdbf0f0867f03e547e47692e415fac\n"
169
+ "gitHead": "6e20f80dd9df1c8055ffa3c1e4d6f7598add0c0b\n"
170
170
  }
package/utils.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { asInt } from "@thi.ng/api/typedarray";
2
2
  import { ident } from "./transforms.js";
3
3
  const __opts = (opts) => {
4
- let { cols, rows, tx } = { rows: opts.cols, tx: ident, ...opts };
4
+ let { cols, rows = opts.cols, tx = ident } = opts;
5
5
  [cols, rows] = asInt(cols, rows);
6
6
  return { cols, rows, tx: tx(cols, rows) };
7
7
  };