Skip to content

Commit d7e6213

Browse files
committed
chore(*): fix lint errors and ignore build outputs
1 parent 0bf5bd4 commit d7e6213

3 files changed

Lines changed: 21 additions & 13 deletions

File tree

cspell.config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,16 @@ words:
3434
- attstorage
3535
- atttypid
3636
- atttypmod
37+
- Brugger
3738
- cientos
3839
- Deditor
3940
- duckdb
41+
- Emscripten
4042
- etcdctl
4143
- guiiai
4244
- healthcheck
45+
- HNSW
46+
- hnswlib
4347
- huggingface
4448
- iconify
4549
- indcheckxmin
@@ -67,13 +71,15 @@ words:
6771
- initdb
6872
- isready
6973
- kebabcase
74+
- knncolle
7075
- Logg
7176
- martinbeentjes
7277
- matchall
7378
- milvus
7479
- minioadmin
7580
- Moeru
7681
- mysqladmin
82+
- nndescent
7783
- nolyfill
7884
- nspacl
7985
- nspname
@@ -163,6 +169,7 @@ words:
163169
- typtype
164170
- typtypmod
165171
- UMAP
172+
- umappp
166173
- unocss
167174
- unplugin
168175
- vueuse

eslint.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export default await antfu(
99
'build/**',
1010
'cspell.config.yaml',
1111
'cspell.config.yml',
12+
'packages/umap-wasm/runtime.js', // Build output
1213
],
1314
rules: {
1415
'import/order': 'off',

packages/umap-wasm/README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,49 +13,49 @@ See `index.d.ts` for the full API.
1313
To initialize the algorithm, use `createUMAP`:
1414

1515
```js
16-
import { createUMAP } from "umap-wasm";
16+
import { createUMAP } from 'umap-wasm'
1717

18-
let count = 2000;
19-
let input_dim = 100;
20-
let output_dim = 2;
18+
const count = 2000
19+
const input_dim = 100
20+
const output_dim = 2
2121

2222
// The data must be a Float32Array with count * input_dim elements.
23-
let data = new Float32Array(count * input_dim);
23+
const data = new Float32Array(count * input_dim)
2424
// ... fill in the data
2525

26-
let options = {
27-
metric: "cosine",
28-
};
26+
const options = {
27+
metric: 'cosine',
28+
}
2929

3030
// Use `createUMAP` to initialize the algorithm.
31-
let umap = await createUMAP(count, input_dim, output_dim, data, options);
31+
const umap = await createUMAP(count, input_dim, output_dim, data, options)
3232
```
3333

3434
After initialization, use the `run` method to update the embedding coordinates:
3535

3636
```js
3737
// Run the algorithm to completion.
38-
umap.run();
38+
umap.run()
3939

4040
// Alternatively, you can run up to a given number of epochs.
4141
// This can be useful for animation effects.
4242
for (let i = 0; i < 100; i++) {
4343
// Run to the i-th epoch.
44-
umap.run(i);
44+
umap.run(i)
4545
}
4646
```
4747

4848
At any time, you can get the current embedding by calling the `embedding` method.
4949

5050
```js
5151
// The result is a Float32Array with count * output_dim elements.
52-
let embedding = umap.embedding();
52+
const embedding = umap.embedding()
5353
```
5454

5555
After you are done with the instance, use the `destroy` method to release resources.
5656

5757
```js
58-
umap.destroy();
58+
umap.destroy()
5959
```
6060

6161
## Development

0 commit comments

Comments
 (0)