czv/czv-wasm
rzmk ce260e9491 refactor: use czv in czv-python
- Add `file_path` for czv-python count operations
- Refactor tests based on file path instead of data
- Use thiserror in czv
- Update examples to reflect changes
2024-06-20 01:03:54 -04:00
..
examples/basic-demo feat: add czv, czv-wasm, and czv-python (init release) 2024-06-19 22:55:19 -04:00
src feat: add czv, czv-wasm, and czv-python (init release) 2024-06-19 22:55:19 -04:00
tests feat: add czv, czv-wasm, and czv-python (init release) 2024-06-19 22:55:19 -04:00
Cargo.toml feat: add czv, czv-wasm, and czv-python (init release) 2024-06-19 22:55:19 -04:00
README.md refactor: use czv in czv-python 2024-06-20 01:03:54 -04:00

czv-wasm

WebAssembly (JavaScript and TypeScript) library for czv. czv is a library of CSV-related operations for data engineering and analysis tasks.

  • For a Rust library see czv.
  • For a Python library see czv-python.

Installation and example

bun install czv

Or use npm, pnpm, or yarn instead of bun.

import init, * as czv from "czv";
// Must run `await init()` or `initSync()` first for web use
await init();

const data = `fruits,price
apple,2.50
banana,3.00
strawberry,1.50`;

const output = czv.rowCount(data);
console.log(output);

Development

You must have wasm-pack installed. If you have Cargo installed you may run:

cargo install wasm-pack

Build WASM for web

wasm-pack build --release --target web

Test WASM for browser

wasm-pack test --firefox --release

You may replace --firefox with another browser such as --chrome and --safari.