├── .github └── workflows │ └── node.yml ├── .gitignore ├── LICENSE ├── README.md ├── bench.js ├── eslint.config.js ├── index.js ├── package-lock.json ├── package.json └── test.js /.github/workflows/node.yml: -------------------------------------------------------------------------------- 1 | name: Node 2 | on: [push, pull_request] 3 | jobs: 4 | test: 5 | runs-on: ubuntu-latest 6 | steps: 7 | - name: Checkout 8 | uses: actions/checkout@v4 9 | 10 | - name: Setup Node 11 | uses: actions/setup-node@v4 12 | with: 13 | node-version: 20 14 | 15 | - name: Install dependencies 16 | run: npm ci 17 | 18 | - name: Run tests 19 | run: npm test 20 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | ISC License 2 | 3 | Copyright (c) 2024, Mapbox 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any purpose 6 | with or without fee is hereby granted, provided that the above copyright notice 7 | and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 10 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 11 | FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 12 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 13 | OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 14 | TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF 15 | THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## dobbyscan [![Node](https://github.com/mapbox/dobbyscan/actions/workflows/node.yml/badge.svg)](https://github.com/mapbox/dobbyscan/actions/workflows/node.yml) [![Simply Awesome](https://img.shields.io/badge/simply-awesome-brightgreen.svg)](https://github.com/mourner/projects) 2 | 3 | A very fast density based clustering JavaScript library for geographic points. Implements a variation of [DBSCAN](https://en.wikipedia.org/wiki/DBSCAN) with great circle distance metric. 4 | 5 | ### Example 6 | 7 | ```js 8 | const clusters = dobbyscan(points, radius, p => p.lon, p => p.lat); 9 | ``` 10 | 11 | ### API 12 | 13 | #### dobbyscan(points, radius[, getLng, getLat]) 14 | 15 | Returns an array of clusters, where each cluster is an array of points (from the input array). 16 | 17 | - `points`: an array of input points of an arbitrary format. 18 | - `radius`: density clustering radius in kilometers. 19 | - `getLng`: (optional) a function that returns longitude given an input point, `(p) => p[0]` by default. 20 | - `getLat`: (optional) a function that returns latitude given an input point, `(p) => p[1]` by default. 21 | 22 | ### Performance 23 | 24 | This library is incredibly fast — run `bench.js` to see it cluster 135k points in one second. 25 | 26 | ### Install 27 | 28 | ``` 29 | npm install dobbyscan 30 | ``` 31 | -------------------------------------------------------------------------------- /bench.js: -------------------------------------------------------------------------------- 1 | import dobbyscan from './index.js'; 2 | import points from 'all-the-cities'; 3 | 4 | const radius = 10; 5 | 6 | console.log(`Running DBSCAN on ${points.length} points`); 7 | console.time('Clustered in'); 8 | 9 | console.log(`Cluster radius: ${radius} km`); 10 | 11 | const clusters = dobbyscan(points, radius, p => p.loc.coordinates[0], p => p.loc.coordinates[1]); 12 | 13 | console.log(`${clusters.length} clusters found`); 14 | console.timeEnd('Clustered in'); 15 | -------------------------------------------------------------------------------- /eslint.config.js: -------------------------------------------------------------------------------- 1 | export {default} from 'eslint-config-mourner'; 2 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | 2 | import KDBush from 'kdbush'; 3 | import {around} from 'geokdbush'; 4 | 5 | export default function dobbyscan(points, radius, getLng = p => p[0], getLat = p => p[1]) { 6 | 7 | const index = new KDBush(points.length); 8 | for (const p of points) index.add(getLng(p), getLat(p)); 9 | index.finish(); 10 | 11 | const clusters = []; 12 | const clustered = new Uint8Array(points.length); 13 | 14 | function isUnclustered(i) { 15 | return !clustered[i]; 16 | } 17 | 18 | for (let i = 0; i < points.length; i++) { 19 | if (clustered[i]) continue; 20 | 21 | const cluster = []; 22 | const searchQueue = [i]; 23 | clustered[i] = 1; 24 | 25 | while (searchQueue.length) { 26 | const j = searchQueue.pop(); 27 | const p = points[j]; 28 | cluster.push(p); 29 | 30 | const unclusteredNeighbors = around(index, getLng(p), getLat(p), Infinity, radius, isUnclustered); 31 | 32 | for (const q of unclusteredNeighbors) { 33 | clustered[q] = 1; 34 | searchQueue.push(q); 35 | } 36 | } 37 | 38 | clusters.push(cluster); 39 | } 40 | 41 | return clusters; 42 | } 43 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "dobbyscan", 3 | "version": "2.0.0", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "dobbyscan", 9 | "version": "2.0.0", 10 | "dependencies": { 11 | "geokdbush": "^2.0.1", 12 | "kdbush": "^4.0.2" 13 | }, 14 | "devDependencies": { 15 | "all-the-cities": "^3.1.0", 16 | "eslint": "^9.6.0", 17 | "eslint-config-mourner": "^4.0.1" 18 | } 19 | }, 20 | "node_modules/@eslint-community/eslint-utils": { 21 | "version": "4.4.0", 22 | "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", 23 | "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", 24 | "dev": true, 25 | "license": "MIT", 26 | "dependencies": { 27 | "eslint-visitor-keys": "^3.3.0" 28 | }, 29 | "engines": { 30 | "node": "^12.22.0 || ^14.17.0 || >=16.0.0" 31 | }, 32 | "peerDependencies": { 33 | "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" 34 | } 35 | }, 36 | "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { 37 | "version": "3.4.3", 38 | "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", 39 | "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", 40 | "dev": true, 41 | "license": "Apache-2.0", 42 | "engines": { 43 | "node": "^12.22.0 || ^14.17.0 || >=16.0.0" 44 | }, 45 | "funding": { 46 | "url": "https://opencollective.com/eslint" 47 | } 48 | }, 49 | "node_modules/@eslint-community/regexpp": { 50 | "version": "4.10.1", 51 | "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.1.tgz", 52 | "integrity": "sha512-Zm2NGpWELsQAD1xsJzGQpYfvICSsFkEpU0jxBjfdC6uNEWXcHnfs9hScFWtXVDVl+rBQJGrl4g1vcKIejpH9dA==", 53 | "dev": true, 54 | "license": "MIT", 55 | "engines": { 56 | "node": "^12.0.0 || ^14.0.0 || >=16.0.0" 57 | } 58 | }, 59 | "node_modules/@eslint/config-array": { 60 | "version": "0.17.0", 61 | "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.17.0.tgz", 62 | "integrity": "sha512-A68TBu6/1mHHuc5YJL0U0VVeGNiklLAL6rRmhTCP2B5XjWLMnrX+HkO+IAXyHvks5cyyY1jjK5ITPQ1HGS2EVA==", 63 | "dev": true, 64 | "license": "Apache-2.0", 65 | "dependencies": { 66 | "@eslint/object-schema": "^2.1.4", 67 | "debug": "^4.3.1", 68 | "minimatch": "^3.1.2" 69 | }, 70 | "engines": { 71 | "node": "^18.18.0 || ^20.9.0 || >=21.1.0" 72 | } 73 | }, 74 | "node_modules/@eslint/eslintrc": { 75 | "version": "3.1.0", 76 | "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.1.0.tgz", 77 | "integrity": "sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==", 78 | "dev": true, 79 | "license": "MIT", 80 | "dependencies": { 81 | "ajv": "^6.12.4", 82 | "debug": "^4.3.2", 83 | "espree": "^10.0.1", 84 | "globals": "^14.0.0", 85 | "ignore": "^5.2.0", 86 | "import-fresh": "^3.2.1", 87 | "js-yaml": "^4.1.0", 88 | "minimatch": "^3.1.2", 89 | "strip-json-comments": "^3.1.1" 90 | }, 91 | "engines": { 92 | "node": "^18.18.0 || ^20.9.0 || >=21.1.0" 93 | }, 94 | "funding": { 95 | "url": "https://opencollective.com/eslint" 96 | } 97 | }, 98 | "node_modules/@eslint/js": { 99 | "version": "9.6.0", 100 | "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.6.0.tgz", 101 | "integrity": "sha512-D9B0/3vNg44ZeWbYMpBoXqNP4j6eQD5vNwIlGAuFRRzK/WtT/jvDQW3Bi9kkf3PMDMlM7Yi+73VLUsn5bJcl8A==", 102 | "dev": true, 103 | "license": "MIT", 104 | "engines": { 105 | "node": "^18.18.0 || ^20.9.0 || >=21.1.0" 106 | } 107 | }, 108 | "node_modules/@eslint/object-schema": { 109 | "version": "2.1.4", 110 | "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.4.tgz", 111 | "integrity": "sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==", 112 | "dev": true, 113 | "license": "Apache-2.0", 114 | "engines": { 115 | "node": "^18.18.0 || ^20.9.0 || >=21.1.0" 116 | } 117 | }, 118 | "node_modules/@humanwhocodes/module-importer": { 119 | "version": "1.0.1", 120 | "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", 121 | "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", 122 | "dev": true, 123 | "license": "Apache-2.0", 124 | "engines": { 125 | "node": ">=12.22" 126 | }, 127 | "funding": { 128 | "type": "github", 129 | "url": "https://github.com/sponsors/nzakas" 130 | } 131 | }, 132 | "node_modules/@humanwhocodes/retry": { 133 | "version": "0.3.0", 134 | "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.0.tgz", 135 | "integrity": "sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==", 136 | "dev": true, 137 | "license": "Apache-2.0", 138 | "engines": { 139 | "node": ">=18.18" 140 | }, 141 | "funding": { 142 | "type": "github", 143 | "url": "https://github.com/sponsors/nzakas" 144 | } 145 | }, 146 | "node_modules/@nodelib/fs.scandir": { 147 | "version": "2.1.5", 148 | "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", 149 | "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", 150 | "dev": true, 151 | "license": "MIT", 152 | "dependencies": { 153 | "@nodelib/fs.stat": "2.0.5", 154 | "run-parallel": "^1.1.9" 155 | }, 156 | "engines": { 157 | "node": ">= 8" 158 | } 159 | }, 160 | "node_modules/@nodelib/fs.stat": { 161 | "version": "2.0.5", 162 | "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", 163 | "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", 164 | "dev": true, 165 | "license": "MIT", 166 | "engines": { 167 | "node": ">= 8" 168 | } 169 | }, 170 | "node_modules/@nodelib/fs.walk": { 171 | "version": "1.2.8", 172 | "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", 173 | "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", 174 | "dev": true, 175 | "license": "MIT", 176 | "dependencies": { 177 | "@nodelib/fs.scandir": "2.1.5", 178 | "fastq": "^1.6.0" 179 | }, 180 | "engines": { 181 | "node": ">= 8" 182 | } 183 | }, 184 | "node_modules/@stylistic/eslint-plugin-js": { 185 | "version": "2.3.0", 186 | "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-js/-/eslint-plugin-js-2.3.0.tgz", 187 | "integrity": "sha512-lQwoiYb0Fs6Yc5QS3uT8+T9CPKK2Eoxc3H8EnYJgM26v/DgtW+1lvy2WNgyBflU+ThShZaHm3a6CdD9QeKx23w==", 188 | "dev": true, 189 | "license": "MIT", 190 | "dependencies": { 191 | "@types/eslint": "^8.56.10", 192 | "acorn": "^8.11.3", 193 | "eslint-visitor-keys": "^4.0.0", 194 | "espree": "^10.0.1" 195 | }, 196 | "engines": { 197 | "node": "^18.18.0 || ^20.9.0 || >=21.1.0" 198 | }, 199 | "peerDependencies": { 200 | "eslint": ">=8.40.0" 201 | } 202 | }, 203 | "node_modules/@types/eslint": { 204 | "version": "8.56.10", 205 | "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.10.tgz", 206 | "integrity": "sha512-Shavhk87gCtY2fhXDctcfS3e6FdxWkCx1iUZ9eEUbh7rTqlZT0/IzOkCOVt0fCjcFuZ9FPYfuezTBImfHCDBGQ==", 207 | "dev": true, 208 | "license": "MIT", 209 | "dependencies": { 210 | "@types/estree": "*", 211 | "@types/json-schema": "*" 212 | } 213 | }, 214 | "node_modules/@types/estree": { 215 | "version": "1.0.5", 216 | "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", 217 | "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", 218 | "dev": true, 219 | "license": "MIT" 220 | }, 221 | "node_modules/@types/json-schema": { 222 | "version": "7.0.15", 223 | "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", 224 | "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", 225 | "dev": true, 226 | "license": "MIT" 227 | }, 228 | "node_modules/acorn": { 229 | "version": "8.12.0", 230 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.0.tgz", 231 | "integrity": "sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==", 232 | "dev": true, 233 | "license": "MIT", 234 | "bin": { 235 | "acorn": "bin/acorn" 236 | }, 237 | "engines": { 238 | "node": ">=0.4.0" 239 | } 240 | }, 241 | "node_modules/acorn-jsx": { 242 | "version": "5.3.2", 243 | "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", 244 | "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", 245 | "dev": true, 246 | "license": "MIT", 247 | "peerDependencies": { 248 | "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" 249 | } 250 | }, 251 | "node_modules/ajv": { 252 | "version": "6.12.6", 253 | "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", 254 | "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", 255 | "dev": true, 256 | "license": "MIT", 257 | "dependencies": { 258 | "fast-deep-equal": "^3.1.1", 259 | "fast-json-stable-stringify": "^2.0.0", 260 | "json-schema-traverse": "^0.4.1", 261 | "uri-js": "^4.2.2" 262 | }, 263 | "funding": { 264 | "type": "github", 265 | "url": "https://github.com/sponsors/epoberezkin" 266 | } 267 | }, 268 | "node_modules/all-the-cities": { 269 | "version": "3.1.0", 270 | "resolved": "https://registry.npmjs.org/all-the-cities/-/all-the-cities-3.1.0.tgz", 271 | "integrity": "sha512-Jx+mZR7lUVSX+qk785T3MRkAJYMvUpOmeNQSCbUl1WcCNpBUKJsQJ6uZzOl3/bWXVIUx1UhDFs8ASDHSI3rvzg==", 272 | "dev": true, 273 | "license": "MIT", 274 | "dependencies": { 275 | "pbf": "^3.2.1" 276 | } 277 | }, 278 | "node_modules/ansi-regex": { 279 | "version": "5.0.1", 280 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", 281 | "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", 282 | "dev": true, 283 | "license": "MIT", 284 | "engines": { 285 | "node": ">=8" 286 | } 287 | }, 288 | "node_modules/ansi-styles": { 289 | "version": "4.3.0", 290 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 291 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 292 | "dev": true, 293 | "license": "MIT", 294 | "dependencies": { 295 | "color-convert": "^2.0.1" 296 | }, 297 | "engines": { 298 | "node": ">=8" 299 | }, 300 | "funding": { 301 | "url": "https://github.com/chalk/ansi-styles?sponsor=1" 302 | } 303 | }, 304 | "node_modules/argparse": { 305 | "version": "2.0.1", 306 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", 307 | "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", 308 | "dev": true, 309 | "license": "Python-2.0" 310 | }, 311 | "node_modules/balanced-match": { 312 | "version": "1.0.2", 313 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 314 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", 315 | "dev": true, 316 | "license": "MIT" 317 | }, 318 | "node_modules/brace-expansion": { 319 | "version": "1.1.11", 320 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 321 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 322 | "dev": true, 323 | "license": "MIT", 324 | "dependencies": { 325 | "balanced-match": "^1.0.0", 326 | "concat-map": "0.0.1" 327 | } 328 | }, 329 | "node_modules/callsites": { 330 | "version": "3.1.0", 331 | "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", 332 | "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", 333 | "dev": true, 334 | "license": "MIT", 335 | "engines": { 336 | "node": ">=6" 337 | } 338 | }, 339 | "node_modules/chalk": { 340 | "version": "4.1.2", 341 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", 342 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", 343 | "dev": true, 344 | "license": "MIT", 345 | "dependencies": { 346 | "ansi-styles": "^4.1.0", 347 | "supports-color": "^7.1.0" 348 | }, 349 | "engines": { 350 | "node": ">=10" 351 | }, 352 | "funding": { 353 | "url": "https://github.com/chalk/chalk?sponsor=1" 354 | } 355 | }, 356 | "node_modules/color-convert": { 357 | "version": "2.0.1", 358 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 359 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 360 | "dev": true, 361 | "license": "MIT", 362 | "dependencies": { 363 | "color-name": "~1.1.4" 364 | }, 365 | "engines": { 366 | "node": ">=7.0.0" 367 | } 368 | }, 369 | "node_modules/color-name": { 370 | "version": "1.1.4", 371 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 372 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", 373 | "dev": true, 374 | "license": "MIT" 375 | }, 376 | "node_modules/concat-map": { 377 | "version": "0.0.1", 378 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 379 | "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", 380 | "dev": true, 381 | "license": "MIT" 382 | }, 383 | "node_modules/cross-spawn": { 384 | "version": "7.0.3", 385 | "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", 386 | "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", 387 | "dev": true, 388 | "license": "MIT", 389 | "dependencies": { 390 | "path-key": "^3.1.0", 391 | "shebang-command": "^2.0.0", 392 | "which": "^2.0.1" 393 | }, 394 | "engines": { 395 | "node": ">= 8" 396 | } 397 | }, 398 | "node_modules/debug": { 399 | "version": "4.3.5", 400 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", 401 | "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", 402 | "dev": true, 403 | "license": "MIT", 404 | "dependencies": { 405 | "ms": "2.1.2" 406 | }, 407 | "engines": { 408 | "node": ">=6.0" 409 | }, 410 | "peerDependenciesMeta": { 411 | "supports-color": { 412 | "optional": true 413 | } 414 | } 415 | }, 416 | "node_modules/deep-is": { 417 | "version": "0.1.4", 418 | "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", 419 | "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", 420 | "dev": true, 421 | "license": "MIT" 422 | }, 423 | "node_modules/escape-string-regexp": { 424 | "version": "4.0.0", 425 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", 426 | "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", 427 | "dev": true, 428 | "license": "MIT", 429 | "engines": { 430 | "node": ">=10" 431 | }, 432 | "funding": { 433 | "url": "https://github.com/sponsors/sindresorhus" 434 | } 435 | }, 436 | "node_modules/eslint": { 437 | "version": "9.6.0", 438 | "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.6.0.tgz", 439 | "integrity": "sha512-ElQkdLMEEqQNM9Njff+2Y4q2afHk7JpkPvrd7Xh7xefwgQynqPxwf55J7di9+MEibWUGdNjFF9ITG9Pck5M84w==", 440 | "dev": true, 441 | "license": "MIT", 442 | "dependencies": { 443 | "@eslint-community/eslint-utils": "^4.2.0", 444 | "@eslint-community/regexpp": "^4.6.1", 445 | "@eslint/config-array": "^0.17.0", 446 | "@eslint/eslintrc": "^3.1.0", 447 | "@eslint/js": "9.6.0", 448 | "@humanwhocodes/module-importer": "^1.0.1", 449 | "@humanwhocodes/retry": "^0.3.0", 450 | "@nodelib/fs.walk": "^1.2.8", 451 | "ajv": "^6.12.4", 452 | "chalk": "^4.0.0", 453 | "cross-spawn": "^7.0.2", 454 | "debug": "^4.3.2", 455 | "escape-string-regexp": "^4.0.0", 456 | "eslint-scope": "^8.0.1", 457 | "eslint-visitor-keys": "^4.0.0", 458 | "espree": "^10.1.0", 459 | "esquery": "^1.5.0", 460 | "esutils": "^2.0.2", 461 | "fast-deep-equal": "^3.1.3", 462 | "file-entry-cache": "^8.0.0", 463 | "find-up": "^5.0.0", 464 | "glob-parent": "^6.0.2", 465 | "ignore": "^5.2.0", 466 | "imurmurhash": "^0.1.4", 467 | "is-glob": "^4.0.0", 468 | "is-path-inside": "^3.0.3", 469 | "json-stable-stringify-without-jsonify": "^1.0.1", 470 | "levn": "^0.4.1", 471 | "lodash.merge": "^4.6.2", 472 | "minimatch": "^3.1.2", 473 | "natural-compare": "^1.4.0", 474 | "optionator": "^0.9.3", 475 | "strip-ansi": "^6.0.1", 476 | "text-table": "^0.2.0" 477 | }, 478 | "bin": { 479 | "eslint": "bin/eslint.js" 480 | }, 481 | "engines": { 482 | "node": "^18.18.0 || ^20.9.0 || >=21.1.0" 483 | }, 484 | "funding": { 485 | "url": "https://eslint.org/donate" 486 | } 487 | }, 488 | "node_modules/eslint-config-mourner": { 489 | "version": "4.0.1", 490 | "resolved": "https://registry.npmjs.org/eslint-config-mourner/-/eslint-config-mourner-4.0.1.tgz", 491 | "integrity": "sha512-seylu4qdUc7kabx42zEedJiCyRDYqwsZLFPPnMRntmOFOQv6cKoM+FqhYpLKZ5dF7A7wW6mCympQSkg6RVxGlg==", 492 | "dev": true, 493 | "license": "ISC", 494 | "dependencies": { 495 | "@eslint/js": "^9.5.0", 496 | "@stylistic/eslint-plugin-js": "^2.2.2" 497 | } 498 | }, 499 | "node_modules/eslint-scope": { 500 | "version": "8.0.1", 501 | "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.0.1.tgz", 502 | "integrity": "sha512-pL8XjgP4ZOmmwfFE8mEhSxA7ZY4C+LWyqjQ3o4yWkkmD0qcMT9kkW3zWHOczhWcjTSgqycYAgwSlXvZltv65og==", 503 | "dev": true, 504 | "license": "BSD-2-Clause", 505 | "dependencies": { 506 | "esrecurse": "^4.3.0", 507 | "estraverse": "^5.2.0" 508 | }, 509 | "engines": { 510 | "node": "^18.18.0 || ^20.9.0 || >=21.1.0" 511 | }, 512 | "funding": { 513 | "url": "https://opencollective.com/eslint" 514 | } 515 | }, 516 | "node_modules/eslint-visitor-keys": { 517 | "version": "4.0.0", 518 | "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz", 519 | "integrity": "sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==", 520 | "dev": true, 521 | "license": "Apache-2.0", 522 | "engines": { 523 | "node": "^18.18.0 || ^20.9.0 || >=21.1.0" 524 | }, 525 | "funding": { 526 | "url": "https://opencollective.com/eslint" 527 | } 528 | }, 529 | "node_modules/espree": { 530 | "version": "10.1.0", 531 | "resolved": "https://registry.npmjs.org/espree/-/espree-10.1.0.tgz", 532 | "integrity": "sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==", 533 | "dev": true, 534 | "license": "BSD-2-Clause", 535 | "dependencies": { 536 | "acorn": "^8.12.0", 537 | "acorn-jsx": "^5.3.2", 538 | "eslint-visitor-keys": "^4.0.0" 539 | }, 540 | "engines": { 541 | "node": "^18.18.0 || ^20.9.0 || >=21.1.0" 542 | }, 543 | "funding": { 544 | "url": "https://opencollective.com/eslint" 545 | } 546 | }, 547 | "node_modules/esquery": { 548 | "version": "1.5.0", 549 | "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", 550 | "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", 551 | "dev": true, 552 | "license": "BSD-3-Clause", 553 | "dependencies": { 554 | "estraverse": "^5.1.0" 555 | }, 556 | "engines": { 557 | "node": ">=0.10" 558 | } 559 | }, 560 | "node_modules/esrecurse": { 561 | "version": "4.3.0", 562 | "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", 563 | "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", 564 | "dev": true, 565 | "license": "BSD-2-Clause", 566 | "dependencies": { 567 | "estraverse": "^5.2.0" 568 | }, 569 | "engines": { 570 | "node": ">=4.0" 571 | } 572 | }, 573 | "node_modules/estraverse": { 574 | "version": "5.3.0", 575 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", 576 | "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", 577 | "dev": true, 578 | "license": "BSD-2-Clause", 579 | "engines": { 580 | "node": ">=4.0" 581 | } 582 | }, 583 | "node_modules/esutils": { 584 | "version": "2.0.3", 585 | "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", 586 | "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", 587 | "dev": true, 588 | "license": "BSD-2-Clause", 589 | "engines": { 590 | "node": ">=0.10.0" 591 | } 592 | }, 593 | "node_modules/fast-deep-equal": { 594 | "version": "3.1.3", 595 | "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", 596 | "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", 597 | "dev": true, 598 | "license": "MIT" 599 | }, 600 | "node_modules/fast-json-stable-stringify": { 601 | "version": "2.1.0", 602 | "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", 603 | "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", 604 | "dev": true, 605 | "license": "MIT" 606 | }, 607 | "node_modules/fast-levenshtein": { 608 | "version": "2.0.6", 609 | "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", 610 | "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", 611 | "dev": true, 612 | "license": "MIT" 613 | }, 614 | "node_modules/fastq": { 615 | "version": "1.17.1", 616 | "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", 617 | "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", 618 | "dev": true, 619 | "license": "ISC", 620 | "dependencies": { 621 | "reusify": "^1.0.4" 622 | } 623 | }, 624 | "node_modules/file-entry-cache": { 625 | "version": "8.0.0", 626 | "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", 627 | "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", 628 | "dev": true, 629 | "license": "MIT", 630 | "dependencies": { 631 | "flat-cache": "^4.0.0" 632 | }, 633 | "engines": { 634 | "node": ">=16.0.0" 635 | } 636 | }, 637 | "node_modules/find-up": { 638 | "version": "5.0.0", 639 | "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", 640 | "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", 641 | "dev": true, 642 | "license": "MIT", 643 | "dependencies": { 644 | "locate-path": "^6.0.0", 645 | "path-exists": "^4.0.0" 646 | }, 647 | "engines": { 648 | "node": ">=10" 649 | }, 650 | "funding": { 651 | "url": "https://github.com/sponsors/sindresorhus" 652 | } 653 | }, 654 | "node_modules/flat-cache": { 655 | "version": "4.0.1", 656 | "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", 657 | "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", 658 | "dev": true, 659 | "license": "MIT", 660 | "dependencies": { 661 | "flatted": "^3.2.9", 662 | "keyv": "^4.5.4" 663 | }, 664 | "engines": { 665 | "node": ">=16" 666 | } 667 | }, 668 | "node_modules/flatted": { 669 | "version": "3.3.1", 670 | "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", 671 | "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", 672 | "dev": true, 673 | "license": "ISC" 674 | }, 675 | "node_modules/geokdbush": { 676 | "version": "2.0.1", 677 | "resolved": "https://registry.npmjs.org/geokdbush/-/geokdbush-2.0.1.tgz", 678 | "integrity": "sha512-0M8so1Qx6+jJ1xpirpCNrgUsWAzIcQ3LrLmh0KJPBYI3gH7vy70nY5zEEjSp9Tn0nBt6Q2Fh922oL08lfib4Zg==", 679 | "license": "ISC", 680 | "dependencies": { 681 | "tinyqueue": "^2.0.3" 682 | } 683 | }, 684 | "node_modules/glob-parent": { 685 | "version": "6.0.2", 686 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", 687 | "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", 688 | "dev": true, 689 | "license": "ISC", 690 | "dependencies": { 691 | "is-glob": "^4.0.3" 692 | }, 693 | "engines": { 694 | "node": ">=10.13.0" 695 | } 696 | }, 697 | "node_modules/globals": { 698 | "version": "14.0.0", 699 | "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", 700 | "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", 701 | "dev": true, 702 | "license": "MIT", 703 | "engines": { 704 | "node": ">=18" 705 | }, 706 | "funding": { 707 | "url": "https://github.com/sponsors/sindresorhus" 708 | } 709 | }, 710 | "node_modules/has-flag": { 711 | "version": "4.0.0", 712 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 713 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", 714 | "dev": true, 715 | "license": "MIT", 716 | "engines": { 717 | "node": ">=8" 718 | } 719 | }, 720 | "node_modules/ieee754": { 721 | "version": "1.2.1", 722 | "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", 723 | "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", 724 | "dev": true, 725 | "funding": [ 726 | { 727 | "type": "github", 728 | "url": "https://github.com/sponsors/feross" 729 | }, 730 | { 731 | "type": "patreon", 732 | "url": "https://www.patreon.com/feross" 733 | }, 734 | { 735 | "type": "consulting", 736 | "url": "https://feross.org/support" 737 | } 738 | ], 739 | "license": "BSD-3-Clause" 740 | }, 741 | "node_modules/ignore": { 742 | "version": "5.3.1", 743 | "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", 744 | "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", 745 | "dev": true, 746 | "license": "MIT", 747 | "engines": { 748 | "node": ">= 4" 749 | } 750 | }, 751 | "node_modules/import-fresh": { 752 | "version": "3.3.0", 753 | "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", 754 | "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", 755 | "dev": true, 756 | "license": "MIT", 757 | "dependencies": { 758 | "parent-module": "^1.0.0", 759 | "resolve-from": "^4.0.0" 760 | }, 761 | "engines": { 762 | "node": ">=6" 763 | }, 764 | "funding": { 765 | "url": "https://github.com/sponsors/sindresorhus" 766 | } 767 | }, 768 | "node_modules/imurmurhash": { 769 | "version": "0.1.4", 770 | "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", 771 | "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", 772 | "dev": true, 773 | "license": "MIT", 774 | "engines": { 775 | "node": ">=0.8.19" 776 | } 777 | }, 778 | "node_modules/is-extglob": { 779 | "version": "2.1.1", 780 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 781 | "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", 782 | "dev": true, 783 | "license": "MIT", 784 | "engines": { 785 | "node": ">=0.10.0" 786 | } 787 | }, 788 | "node_modules/is-glob": { 789 | "version": "4.0.3", 790 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", 791 | "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", 792 | "dev": true, 793 | "license": "MIT", 794 | "dependencies": { 795 | "is-extglob": "^2.1.1" 796 | }, 797 | "engines": { 798 | "node": ">=0.10.0" 799 | } 800 | }, 801 | "node_modules/is-path-inside": { 802 | "version": "3.0.3", 803 | "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", 804 | "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", 805 | "dev": true, 806 | "license": "MIT", 807 | "engines": { 808 | "node": ">=8" 809 | } 810 | }, 811 | "node_modules/isexe": { 812 | "version": "2.0.0", 813 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", 814 | "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", 815 | "dev": true, 816 | "license": "ISC" 817 | }, 818 | "node_modules/js-yaml": { 819 | "version": "4.1.0", 820 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", 821 | "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", 822 | "dev": true, 823 | "license": "MIT", 824 | "dependencies": { 825 | "argparse": "^2.0.1" 826 | }, 827 | "bin": { 828 | "js-yaml": "bin/js-yaml.js" 829 | } 830 | }, 831 | "node_modules/json-buffer": { 832 | "version": "3.0.1", 833 | "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", 834 | "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", 835 | "dev": true, 836 | "license": "MIT" 837 | }, 838 | "node_modules/json-schema-traverse": { 839 | "version": "0.4.1", 840 | "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", 841 | "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", 842 | "dev": true, 843 | "license": "MIT" 844 | }, 845 | "node_modules/json-stable-stringify-without-jsonify": { 846 | "version": "1.0.1", 847 | "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", 848 | "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", 849 | "dev": true, 850 | "license": "MIT" 851 | }, 852 | "node_modules/kdbush": { 853 | "version": "4.0.2", 854 | "resolved": "https://registry.npmjs.org/kdbush/-/kdbush-4.0.2.tgz", 855 | "integrity": "sha512-WbCVYJ27Sz8zi9Q7Q0xHC+05iwkm3Znipc2XTlrnJbsHMYktW4hPhXUE8Ys1engBrvffoSCqbil1JQAa7clRpA==", 856 | "license": "ISC" 857 | }, 858 | "node_modules/keyv": { 859 | "version": "4.5.4", 860 | "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", 861 | "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", 862 | "dev": true, 863 | "license": "MIT", 864 | "dependencies": { 865 | "json-buffer": "3.0.1" 866 | } 867 | }, 868 | "node_modules/levn": { 869 | "version": "0.4.1", 870 | "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", 871 | "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", 872 | "dev": true, 873 | "license": "MIT", 874 | "dependencies": { 875 | "prelude-ls": "^1.2.1", 876 | "type-check": "~0.4.0" 877 | }, 878 | "engines": { 879 | "node": ">= 0.8.0" 880 | } 881 | }, 882 | "node_modules/locate-path": { 883 | "version": "6.0.0", 884 | "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", 885 | "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", 886 | "dev": true, 887 | "license": "MIT", 888 | "dependencies": { 889 | "p-locate": "^5.0.0" 890 | }, 891 | "engines": { 892 | "node": ">=10" 893 | }, 894 | "funding": { 895 | "url": "https://github.com/sponsors/sindresorhus" 896 | } 897 | }, 898 | "node_modules/lodash.merge": { 899 | "version": "4.6.2", 900 | "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", 901 | "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", 902 | "dev": true, 903 | "license": "MIT" 904 | }, 905 | "node_modules/minimatch": { 906 | "version": "3.1.2", 907 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", 908 | "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", 909 | "dev": true, 910 | "license": "ISC", 911 | "dependencies": { 912 | "brace-expansion": "^1.1.7" 913 | }, 914 | "engines": { 915 | "node": "*" 916 | } 917 | }, 918 | "node_modules/ms": { 919 | "version": "2.1.2", 920 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 921 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", 922 | "dev": true, 923 | "license": "MIT" 924 | }, 925 | "node_modules/natural-compare": { 926 | "version": "1.4.0", 927 | "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", 928 | "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", 929 | "dev": true, 930 | "license": "MIT" 931 | }, 932 | "node_modules/optionator": { 933 | "version": "0.9.4", 934 | "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", 935 | "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", 936 | "dev": true, 937 | "license": "MIT", 938 | "dependencies": { 939 | "deep-is": "^0.1.3", 940 | "fast-levenshtein": "^2.0.6", 941 | "levn": "^0.4.1", 942 | "prelude-ls": "^1.2.1", 943 | "type-check": "^0.4.0", 944 | "word-wrap": "^1.2.5" 945 | }, 946 | "engines": { 947 | "node": ">= 0.8.0" 948 | } 949 | }, 950 | "node_modules/p-limit": { 951 | "version": "3.1.0", 952 | "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", 953 | "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", 954 | "dev": true, 955 | "license": "MIT", 956 | "dependencies": { 957 | "yocto-queue": "^0.1.0" 958 | }, 959 | "engines": { 960 | "node": ">=10" 961 | }, 962 | "funding": { 963 | "url": "https://github.com/sponsors/sindresorhus" 964 | } 965 | }, 966 | "node_modules/p-locate": { 967 | "version": "5.0.0", 968 | "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", 969 | "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", 970 | "dev": true, 971 | "license": "MIT", 972 | "dependencies": { 973 | "p-limit": "^3.0.2" 974 | }, 975 | "engines": { 976 | "node": ">=10" 977 | }, 978 | "funding": { 979 | "url": "https://github.com/sponsors/sindresorhus" 980 | } 981 | }, 982 | "node_modules/parent-module": { 983 | "version": "1.0.1", 984 | "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", 985 | "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", 986 | "dev": true, 987 | "license": "MIT", 988 | "dependencies": { 989 | "callsites": "^3.0.0" 990 | }, 991 | "engines": { 992 | "node": ">=6" 993 | } 994 | }, 995 | "node_modules/path-exists": { 996 | "version": "4.0.0", 997 | "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", 998 | "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", 999 | "dev": true, 1000 | "license": "MIT", 1001 | "engines": { 1002 | "node": ">=8" 1003 | } 1004 | }, 1005 | "node_modules/path-key": { 1006 | "version": "3.1.1", 1007 | "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", 1008 | "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", 1009 | "dev": true, 1010 | "license": "MIT", 1011 | "engines": { 1012 | "node": ">=8" 1013 | } 1014 | }, 1015 | "node_modules/pbf": { 1016 | "version": "3.2.1", 1017 | "resolved": "https://registry.npmjs.org/pbf/-/pbf-3.2.1.tgz", 1018 | "integrity": "sha512-ClrV7pNOn7rtmoQVF4TS1vyU0WhYRnP92fzbfF75jAIwpnzdJXf8iTd4CMEqO4yUenH6NDqLiwjqlh6QgZzgLQ==", 1019 | "dev": true, 1020 | "license": "BSD-3-Clause", 1021 | "dependencies": { 1022 | "ieee754": "^1.1.12", 1023 | "resolve-protobuf-schema": "^2.1.0" 1024 | }, 1025 | "bin": { 1026 | "pbf": "bin/pbf" 1027 | } 1028 | }, 1029 | "node_modules/prelude-ls": { 1030 | "version": "1.2.1", 1031 | "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", 1032 | "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", 1033 | "dev": true, 1034 | "license": "MIT", 1035 | "engines": { 1036 | "node": ">= 0.8.0" 1037 | } 1038 | }, 1039 | "node_modules/protocol-buffers-schema": { 1040 | "version": "3.6.0", 1041 | "resolved": "https://registry.npmjs.org/protocol-buffers-schema/-/protocol-buffers-schema-3.6.0.tgz", 1042 | "integrity": "sha512-TdDRD+/QNdrCGCE7v8340QyuXd4kIWIgapsE2+n/SaGiSSbomYl4TjHlvIoCWRpE7wFt02EpB35VVA2ImcBVqw==", 1043 | "dev": true, 1044 | "license": "MIT" 1045 | }, 1046 | "node_modules/punycode": { 1047 | "version": "2.3.1", 1048 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", 1049 | "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", 1050 | "dev": true, 1051 | "license": "MIT", 1052 | "engines": { 1053 | "node": ">=6" 1054 | } 1055 | }, 1056 | "node_modules/queue-microtask": { 1057 | "version": "1.2.3", 1058 | "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", 1059 | "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", 1060 | "dev": true, 1061 | "funding": [ 1062 | { 1063 | "type": "github", 1064 | "url": "https://github.com/sponsors/feross" 1065 | }, 1066 | { 1067 | "type": "patreon", 1068 | "url": "https://www.patreon.com/feross" 1069 | }, 1070 | { 1071 | "type": "consulting", 1072 | "url": "https://feross.org/support" 1073 | } 1074 | ], 1075 | "license": "MIT" 1076 | }, 1077 | "node_modules/resolve-from": { 1078 | "version": "4.0.0", 1079 | "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", 1080 | "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", 1081 | "dev": true, 1082 | "license": "MIT", 1083 | "engines": { 1084 | "node": ">=4" 1085 | } 1086 | }, 1087 | "node_modules/resolve-protobuf-schema": { 1088 | "version": "2.1.0", 1089 | "resolved": "https://registry.npmjs.org/resolve-protobuf-schema/-/resolve-protobuf-schema-2.1.0.tgz", 1090 | "integrity": "sha512-kI5ffTiZWmJaS/huM8wZfEMer1eRd7oJQhDuxeCLe3t7N7mX3z94CN0xPxBQxFYQTSNz9T0i+v6inKqSdK8xrQ==", 1091 | "dev": true, 1092 | "license": "MIT", 1093 | "dependencies": { 1094 | "protocol-buffers-schema": "^3.3.1" 1095 | } 1096 | }, 1097 | "node_modules/reusify": { 1098 | "version": "1.0.4", 1099 | "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", 1100 | "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", 1101 | "dev": true, 1102 | "license": "MIT", 1103 | "engines": { 1104 | "iojs": ">=1.0.0", 1105 | "node": ">=0.10.0" 1106 | } 1107 | }, 1108 | "node_modules/run-parallel": { 1109 | "version": "1.2.0", 1110 | "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", 1111 | "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", 1112 | "dev": true, 1113 | "funding": [ 1114 | { 1115 | "type": "github", 1116 | "url": "https://github.com/sponsors/feross" 1117 | }, 1118 | { 1119 | "type": "patreon", 1120 | "url": "https://www.patreon.com/feross" 1121 | }, 1122 | { 1123 | "type": "consulting", 1124 | "url": "https://feross.org/support" 1125 | } 1126 | ], 1127 | "license": "MIT", 1128 | "dependencies": { 1129 | "queue-microtask": "^1.2.2" 1130 | } 1131 | }, 1132 | "node_modules/shebang-command": { 1133 | "version": "2.0.0", 1134 | "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", 1135 | "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", 1136 | "dev": true, 1137 | "license": "MIT", 1138 | "dependencies": { 1139 | "shebang-regex": "^3.0.0" 1140 | }, 1141 | "engines": { 1142 | "node": ">=8" 1143 | } 1144 | }, 1145 | "node_modules/shebang-regex": { 1146 | "version": "3.0.0", 1147 | "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", 1148 | "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", 1149 | "dev": true, 1150 | "license": "MIT", 1151 | "engines": { 1152 | "node": ">=8" 1153 | } 1154 | }, 1155 | "node_modules/strip-ansi": { 1156 | "version": "6.0.1", 1157 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", 1158 | "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", 1159 | "dev": true, 1160 | "license": "MIT", 1161 | "dependencies": { 1162 | "ansi-regex": "^5.0.1" 1163 | }, 1164 | "engines": { 1165 | "node": ">=8" 1166 | } 1167 | }, 1168 | "node_modules/strip-json-comments": { 1169 | "version": "3.1.1", 1170 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", 1171 | "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", 1172 | "dev": true, 1173 | "license": "MIT", 1174 | "engines": { 1175 | "node": ">=8" 1176 | }, 1177 | "funding": { 1178 | "url": "https://github.com/sponsors/sindresorhus" 1179 | } 1180 | }, 1181 | "node_modules/supports-color": { 1182 | "version": "7.2.0", 1183 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 1184 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 1185 | "dev": true, 1186 | "license": "MIT", 1187 | "dependencies": { 1188 | "has-flag": "^4.0.0" 1189 | }, 1190 | "engines": { 1191 | "node": ">=8" 1192 | } 1193 | }, 1194 | "node_modules/text-table": { 1195 | "version": "0.2.0", 1196 | "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", 1197 | "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", 1198 | "dev": true, 1199 | "license": "MIT" 1200 | }, 1201 | "node_modules/tinyqueue": { 1202 | "version": "2.0.3", 1203 | "resolved": "https://registry.npmjs.org/tinyqueue/-/tinyqueue-2.0.3.tgz", 1204 | "integrity": "sha512-ppJZNDuKGgxzkHihX8v9v9G5f+18gzaTfrukGrq6ueg0lmH4nqVnA2IPG0AEH3jKEk2GRJCUhDoqpoiw3PHLBA==", 1205 | "license": "ISC" 1206 | }, 1207 | "node_modules/type-check": { 1208 | "version": "0.4.0", 1209 | "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", 1210 | "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", 1211 | "dev": true, 1212 | "license": "MIT", 1213 | "dependencies": { 1214 | "prelude-ls": "^1.2.1" 1215 | }, 1216 | "engines": { 1217 | "node": ">= 0.8.0" 1218 | } 1219 | }, 1220 | "node_modules/uri-js": { 1221 | "version": "4.4.1", 1222 | "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", 1223 | "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", 1224 | "dev": true, 1225 | "license": "BSD-2-Clause", 1226 | "dependencies": { 1227 | "punycode": "^2.1.0" 1228 | } 1229 | }, 1230 | "node_modules/which": { 1231 | "version": "2.0.2", 1232 | "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", 1233 | "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", 1234 | "dev": true, 1235 | "license": "ISC", 1236 | "dependencies": { 1237 | "isexe": "^2.0.0" 1238 | }, 1239 | "bin": { 1240 | "node-which": "bin/node-which" 1241 | }, 1242 | "engines": { 1243 | "node": ">= 8" 1244 | } 1245 | }, 1246 | "node_modules/word-wrap": { 1247 | "version": "1.2.5", 1248 | "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", 1249 | "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", 1250 | "dev": true, 1251 | "license": "MIT", 1252 | "engines": { 1253 | "node": ">=0.10.0" 1254 | } 1255 | }, 1256 | "node_modules/yocto-queue": { 1257 | "version": "0.1.0", 1258 | "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", 1259 | "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", 1260 | "dev": true, 1261 | "license": "MIT", 1262 | "engines": { 1263 | "node": ">=10" 1264 | }, 1265 | "funding": { 1266 | "url": "https://github.com/sponsors/sindresorhus" 1267 | } 1268 | } 1269 | } 1270 | } 1271 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "dobbyscan", 3 | "version": "2.0.0", 4 | "type": "module", 5 | "main": "index.js", 6 | "exports": "./index.js", 7 | "description": "A very fast density based clustering library for geographic points", 8 | "homepage": "https://github.com/mapbox/dobbyscan", 9 | "keywords": [ 10 | "clustering", 11 | "spatial", 12 | "geographic", 13 | "algorithm", 14 | "dbscan", 15 | "density" 16 | ], 17 | "files": [], 18 | "author": "Volodymyr Agafonkin", 19 | "repository": { 20 | "type": "git", 21 | "url": "git://github.com/mapbox/dobbyscan.git" 22 | }, 23 | "scripts": { 24 | "pretest": "eslint *.js", 25 | "test": "node test.js" 26 | }, 27 | "dependencies": { 28 | "geokdbush": "^2.0.1", 29 | "kdbush": "^4.0.2" 30 | }, 31 | "devDependencies": { 32 | "all-the-cities": "^3.1.0", 33 | "eslint": "^9.6.0", 34 | "eslint-config-mourner": "^4.0.1" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /test.js: -------------------------------------------------------------------------------- 1 | import test from 'node:test'; 2 | import assert from 'node:assert/strict'; 3 | import cities from 'all-the-cities'; 4 | import dobbyscan from './index.js'; 5 | 6 | test('clusters cities properly', () => { 7 | const clusters = dobbyscan(cities, 10, p => p.loc.coordinates[0], p => p.loc.coordinates[1]); 8 | 9 | assert.equal(clusters.length, 42045); 10 | assert.deepEqual(clusters[0].map(p => p.name), [ 11 | 'El Tarter', 'Encamp', 'Arinsal', 'Andorra la Vella', 12 | 'Sant Julià de Lòria', 'la Massana', 'les Escaldes', 13 | 'Ordino', 'Pas de la Casa', 'Canillo']); 14 | }); 15 | --------------------------------------------------------------------------------