mirror of
https://github.com/rzmk/czv.git
synced 2025-12-27 03:17:00 +00:00
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:
parent
ce260e9491
commit
e84c5bec8b
20 changed files with 564 additions and 168 deletions
|
|
@ -40,30 +40,7 @@
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<script type="module">
|
||||
const input = document.getElementById("upload")
|
||||
const progress = document.getElementById("progress")
|
||||
|
||||
import init, * as czv from "../../pkg/czv.js";
|
||||
// Must run `await init()` or `initSync()` first for web use
|
||||
await init();
|
||||
|
||||
const fileReader = new FileReader()
|
||||
|
||||
fileReader.onloadstart = () => {
|
||||
progress.style.display = "block";
|
||||
}
|
||||
|
||||
fileReader.onloadend = () => {
|
||||
document.getElementById("column-count").innerText = czv.columnCount(fileReader.result)
|
||||
document.getElementById("row-count").innerText = czv.rowCount(fileReader.result)
|
||||
progress.style.display = "none";
|
||||
}
|
||||
|
||||
input.addEventListener("change", () => {
|
||||
fileReader.readAsText(input.files[0])
|
||||
})
|
||||
</script>
|
||||
<script src="script.js" type="module"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue