geo-polygonize 0.2.1 → 0.6.2

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.
@@ -342,15 +342,18 @@ function initThreadPool(num_threads) {
342
342
 
343
343
  /**
344
344
  * @param {string} geojson_str
345
+ * @param {boolean | null} [node_input]
346
+ * @param {number | null} [snap_grid_size]
347
+ * @param {boolean | null} [extract_only_polygonal]
345
348
  * @returns {string}
346
349
  */
347
- function polygonize(geojson_str) {
350
+ function polygonize(geojson_str, node_input, snap_grid_size, extract_only_polygonal) {
348
351
  let deferred3_0;
349
352
  let deferred3_1;
350
353
  try {
351
354
  const ptr0 = passStringToWasm0(geojson_str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
352
355
  const len0 = WASM_VECTOR_LEN;
353
- const ret = wasm.polygonize(ptr0, len0);
356
+ const ret = wasm.polygonize(ptr0, len0, isLikeNone(node_input) ? 0xFFFFFF : node_input ? 1 : 0, !isLikeNone(snap_grid_size), isLikeNone(snap_grid_size) ? 0 : snap_grid_size, isLikeNone(extract_only_polygonal) ? 0xFFFFFF : extract_only_polygonal ? 1 : 0);
354
357
  var ptr2 = ret[0];
355
358
  var len2 = ret[1];
356
359
  if (ret[3]) {
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "geo-polygonize",
3
- "version": "0.2.1",
3
+ "version": "0.6.2",
4
4
  "description": "A native Rust port of the JTS/GEOS polygonization algorithm (Wasm)",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "build": "./scripts/build_wasm.sh",
8
- "test": "vitest run"
8
+ "test": "vitest run",
9
+ "prepare": "husky"
9
10
  },
10
11
  "files": [
11
12
  "dist"
@@ -33,11 +34,18 @@
33
34
  "./*": "./dist/*"
34
35
  },
35
36
  "types": "./dist/standard/es/index.d.ts",
37
+ "repository": {
38
+ "type": "git",
39
+ "url": "https://github.com/graydonpleasants/geo-polygonize"
40
+ },
36
41
  "devDependencies": {
42
+ "@commitlint/cli": "^20.4.3",
43
+ "@commitlint/config-conventional": "^20.4.3",
37
44
  "@rollup/plugin-commonjs": "^25.0.0",
38
45
  "@rollup/plugin-node-resolve": "^15.0.0",
39
46
  "@rollup/plugin-typescript": "^11.0.0",
40
47
  "@rollup/plugin-url": "^8.0.2",
48
+ "husky": "^9.1.7",
41
49
  "rollup": "^4.0.0",
42
50
  "tslib": "^2.6.0",
43
51
  "typescript": "^5.0.0",