]> git.codecow.com Git - nano-pow.git/commitdiff
Add more implementation examples.
authorChris Duncan <chris@codecow.com>
Fri, 31 Jul 2026 17:41:48 +0000 (10:41 -0700)
committerChris Duncan <chris@codecow.com>
Fri, 31 Jul 2026 17:41:48 +0000 (10:41 -0700)
README.md

index 9c38d8b164e3bcb9cb23aaa9bf5cb42e420bed90..5aa0ffe1bfa783a36be34663002a2e8dc42b3b55 100644 (file)
--- a/README.md
+++ b/README.md
@@ -33,15 +33,33 @@ system environment. To learn more, see [#Executables](#executables).
 The easiest way to use NanoPow is to import it directly. Based on the features
 available in the environment, NanoPow will try to use its most performant API.
 
-The following two import statements are equivalent, and both are provided to
+Function exports, object exports, and default exports are all provided to
 accomodate project style preferences:
 
 ```javascript
+import { work_generate, work_validate } from "nano-pow";
+// OR
 import { NanoPow } from "nano-pow";
 // OR
 import NanoPow from "nano-pow";
 ```
 
+Configure URL with import map:
+
+```html
+ <script type="importmap">
+  {
+   "imports": {
+    "nano-pow": "https://unpkg.com/nano-pow"
+   }
+  }
+ </script>
+ <script type="module">
+  import { NanoPow } from 'nano-pow'
+  const { work } = await NanoPow.work_generate(hash);
+  </script>
+```
+
 Use it directly on a webpage with a script module:
 
 ```html