webdggrid 1.0.3 → 1.0.4

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/readme.md +25 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webdggrid",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Wasm package for DGGRID ",
5
5
  "type": "module",
6
6
  "exports": {
package/readme.md CHANGED
@@ -7,6 +7,31 @@
7
7
 
8
8
  </div>
9
9
 
10
+ ## How to use
11
+ Please check `tests` folder for more examples.
10
12
 
13
+ in browser
14
+
15
+ ```js
16
+
17
+ const WebdggridLocal = await import("../dist/index.js").then(m => m.Webdggrid).catch(console.log);
18
+ import { Webdggrid as WebdggridExternal } from "https://cdn.jsdelivr.net/npm/webDggrid/dist/index.js";
19
+
20
+ const Webdggrid = WebdggridLocal ?? WebdggridExternal;
21
+
22
+ const webdggrid = await Webdggrid.load();
23
+ const seqNum = dggs.geoToSequenceNum([[0, 0]]);
24
+
25
+ ```
26
+
27
+
28
+ In nodejs
29
+
30
+ ```js
31
+ import { Webdggrid } from 'webdggrid'
32
+ const dggs = await Webdggrid.load();
33
+ const seqNum = dggs.geoToSequenceNum([[0, 0]]);
34
+
35
+ ```
11
36
 
12
37
  ### Under development