refactor: use options object for WASM function args, improve docs

- Add relevant links to all READMEs and source code
- Resolve clippy lints

czv:

- Add more docs for top-level items
- Add suggestion to use builder methods instead of functions
- Disable slice and slice tests until operation is complete

czv-wasm:

- Use tsify_next for allowing objects as parameters
- Add nodejs example and instructions
This commit is contained in:
rzmk 2024-06-20 16:28:53 -04:00
parent ce260e9491
commit e84c5bec8b
No known key found for this signature in database
20 changed files with 564 additions and 168 deletions

View file

@ -0,0 +1,4 @@
To run this example:
1. Build the `nodejs` compatible bundle in the `czv-wasm` directory with `wasm-pack build -t nodejs --release --out-name czv-ts`.
2. Run `bunx tsx sample.ts` (or `npx`, `pnpx`, etc.).

View file

@ -0,0 +1,12 @@
import czv from "../../pkg/czv-ts";
const options: czv.RowCountOptions = {
file_data: `fruit,price,
apple,2.50
banana,3.00
strawberry,1.50`,
};
const output = czv.rowCount(options);
console.log(output); // 4