@turf/nearest-neighbor-analysis 7.0.0-alpha.0 → 7.0.0-alpha.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.
package/dist/es/index.js CHANGED
@@ -5,7 +5,7 @@ import centroid from "@turf/centroid";
5
5
  import distance from "@turf/distance";
6
6
  import nearestPoint from "@turf/nearest-point";
7
7
  import { featureEach } from "@turf/meta";
8
- import { convertArea, featureCollection } from "@turf/helpers";
8
+ import { convertArea, featureCollection, } from "@turf/helpers";
9
9
  /**
10
10
  * Nearest Neighbor Analysis calculates an index based the average distances
11
11
  * between points in the dataset, thereby providing inference as to whether the
@@ -1,7 +1,7 @@
1
1
  import { FeatureCollection, Feature, Polygon, GeoJsonProperties } from "geojson";
2
- import { Units } from "@turf/helpers";
2
+ import { Units, AreaUnits } from "@turf/helpers";
3
3
  export interface NearestNeighborStatistics {
4
- units: Units;
4
+ units: Units & AreaUnits;
5
5
  arealUnits: string;
6
6
  observedMeanDistance: number;
7
7
  expectedMeanDistance: number;
@@ -67,7 +67,7 @@ export interface NearestNeighborStudyArea extends Feature<Polygon> {
67
67
  */
68
68
  declare function nearestNeighborAnalysis(dataset: FeatureCollection<any>, options?: {
69
69
  studyArea?: Feature<Polygon>;
70
- units?: Units;
70
+ units?: Units & AreaUnits;
71
71
  properties?: GeoJsonProperties;
72
72
  }): NearestNeighborStudyArea;
73
73
  export default nearestNeighborAnalysis;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@turf/nearest-neighbor-analysis",
3
- "version": "7.0.0-alpha.0",
3
+ "version": "7.0.0-alpha.2",
4
4
  "description": "turf nearest-neighbor-analysis module",
5
5
  "author": "Turf Authors",
6
6
  "contributors": [
@@ -28,6 +28,7 @@
28
28
  "exports": {
29
29
  "./package.json": "./package.json",
30
30
  ".": {
31
+ "types": "./dist/js/index.d.ts",
31
32
  "import": "./dist/es/index.js",
32
33
  "require": "./dist/js/index.js"
33
34
  }
@@ -38,36 +39,36 @@
38
39
  "dist"
39
40
  ],
40
41
  "scripts": {
41
- "bench": "ts-node bench.js",
42
+ "bench": "tsx bench.js",
42
43
  "build": "npm-run-all build:*",
43
44
  "build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
44
45
  "build:js": "tsc",
45
- "docs": "node ../../scripts/generate-readmes",
46
+ "docs": "tsx ../../scripts/generate-readmes",
46
47
  "test": "npm-run-all test:*",
47
- "test:tape": "ts-node -r esm test.js"
48
+ "test:tape": "tsx test.js"
48
49
  },
49
50
  "devDependencies": {
50
- "@turf/truncate": "^7.0.0-alpha.0",
51
+ "@turf/truncate": "^7.0.0-alpha.2",
51
52
  "@types/tape": "*",
52
53
  "benchmark": "*",
53
54
  "load-json-file": "*",
54
55
  "npm-run-all": "*",
55
56
  "tape": "*",
56
- "ts-node": "*",
57
57
  "tslint": "*",
58
+ "tsx": "*",
58
59
  "typescript": "*",
59
60
  "write-json-file": "*"
60
61
  },
61
62
  "dependencies": {
62
- "@turf/area": "^7.0.0-alpha.0",
63
- "@turf/bbox": "^7.0.0-alpha.0",
64
- "@turf/bbox-polygon": "^7.0.0-alpha.0",
65
- "@turf/centroid": "^7.0.0-alpha.0",
66
- "@turf/distance": "^7.0.0-alpha.0",
67
- "@turf/helpers": "^7.0.0-alpha.0",
68
- "@turf/meta": "^7.0.0-alpha.0",
69
- "@turf/nearest-point": "^7.0.0-alpha.0",
63
+ "@turf/area": "^7.0.0-alpha.2",
64
+ "@turf/bbox": "^7.0.0-alpha.2",
65
+ "@turf/bbox-polygon": "^7.0.0-alpha.2",
66
+ "@turf/centroid": "^7.0.0-alpha.2",
67
+ "@turf/distance": "^7.0.0-alpha.2",
68
+ "@turf/helpers": "^7.0.0-alpha.2",
69
+ "@turf/meta": "^7.0.0-alpha.2",
70
+ "@turf/nearest-point": "^7.0.0-alpha.2",
70
71
  "tslib": "^2.3.0"
71
72
  },
72
- "gitHead": "0edc4c491b999e5ace770a61e1cf549f7c004189"
73
+ "gitHead": "dd35b52725945b4fa29a98d9a550733e06cc222e"
73
74
  }