File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ The package itself has no runtime dependencies, although if you prefer using `Bu
7070
7171##### Using an importmap
7272
73- If you've installed ` brotli-wasm ` as an NPM package, you can load it from the ` node_modules ` folder :
73+ If you've installed ` brotli-wasm ` as an NPM package, you can load it from your ` node_modules ` subfolder :
7474
7575``` html
7676<!-- index.html -->
@@ -81,7 +81,7 @@ If you've installed `brotli-wasm` as an NPM package, you can load it from the `n
8181 <script type =" importmap" >
8282 {
8383 " imports" : {
84- " brotli-wasm" : " . /node_modules/brotli-wasm/index.web.js"
84+ " brotli-wasm" : " /node_modules/brotli-wasm/index.web.js"
8585 }
8686 }
8787 </script >
@@ -92,9 +92,10 @@ If you've installed `brotli-wasm` as an NPM package, you can load it from the `n
9292
9393``` javascript
9494// main.js
95+ import brotliPromise from ' brotli-wasm' ;
9596const brotli = await brotliPromise;
96- const input = ' some input' ;
9797
98+ const input = ' some input' ;
9899const uncompressedData = new TextEncoder ().encode (input);
99100const compressedData = brotli .compress (uncompressedData);
100101const decompressedData = brotli .decompress (compressedData);
You can’t perform that action at this time.
0 commit comments