docs: update info about WASM web-demo example

This commit is contained in:
rzmk 2024-06-20 17:11:28 -04:00
parent 0648673c46
commit 9bd3090545
No known key found for this signature in database
7 changed files with 11 additions and 3 deletions

View file

@ -43,7 +43,9 @@ bun install czv
Or use `npm`, `pnpm`, or `yarn` instead of `bun`. Or use `npm`, `pnpm`, or `yarn` instead of `bun`.
```js The following example is written in TypeScript:
```ts
import init, * as czv from "czv"; import init, * as czv from "czv";
// Must run `await init()` or `initSync()` first for web use // Must run `await init()` or `initSync()` first for web use
await init(); await init();
@ -53,7 +55,7 @@ apple,2.50
banana,3.00 banana,3.00
strawberry,1.50`; strawberry,1.50`;
const output = czv.rowCount({ const output: number = czv.rowCount({
file_data: data, file_data: data,
include_header_row: true, include_header_row: true,
}); });

View file

@ -1 +1,7 @@
# czv for WebAssembly web demo
View `index.html` in a web browser and import a CSV file.
## Development
If you want to modify the TypeScript code then after you save your modifications you must run `tsc script.ts --module es2022 --target es2022` to generate a compatible `script.js` file. If you want to modify the TypeScript code then after you save your modifications you must run `tsc script.ts --module es2022 --target es2022` to generate a compatible `script.js` file.

View file

@ -24,7 +24,7 @@
//! console.log(output); //! console.log(output);
//! ``` //! ```
//! //!
//! For a full website example see the example's source code here: https://www.npmjs.com/package/czv) <https://github.com/rzmk/czv/tree/main/czv-wasm/examples/basic-demo> //! For a full website example see the example's source code here: https://www.npmjs.com/package/czv) <https://github.com/rzmk/czv/tree/main/czv-wasm/examples/web-demo>
//! //!
//! # Links //! # Links
//! //!