BetaCSV string to parse
Parse options
Record of arrays
This function uses WebAssembly to parse CSV string synchronously.
WASM Initialization: WASM module is automatically initialized on first use. However, it is recommended to call loadWASM beforehand for better performance.
// Recommended: Initialize WASM beforehand
import { loadWASM, parseStringToArraySyncWASM } from 'web-csv-toolbox';
await loadWASM();
const result = parseStringToArraySyncWASM(csv);
// Alternative: Automatic initialization (works but slower on first use)
import { parseStringToArraySyncWASM } from 'web-csv-toolbox';
const result = parseStringToArraySyncWASM(csv);
Performance Characteristics:
Limitations:
") as quotation characterimport { loadWASM, parseStringToArraySyncWASM } from "web-csv-toolbox";
// Recommended: Load WASM beforehand
await loadWASM();
const csv = "a,b,c\n1,2,3";
const result = parseStringToArraySyncWASM(csv);
console.log(result);
// Prints: [{ a: "1", b: "2", c: "3" }]
BetaParse CSV string to record of arrays using WebAssembly (synchronous).
CSV string to parse
Optionaloptions: CommonOptions<Delimiter, Quotation>Parse options
Record of arrays
This function uses WebAssembly to parse CSV string synchronously.
WASM Initialization: WASM module is automatically initialized on first use. However, it is recommended to call loadWASM beforehand for better performance.
// Recommended: Initialize WASM beforehand
import { loadWASM, parseStringToArraySyncWASM } from 'web-csv-toolbox';
await loadWASM();
const result = parseStringToArraySyncWASM(csv);
// Alternative: Automatic initialization (works but slower on first use)
import { parseStringToArraySyncWASM } from 'web-csv-toolbox';
const result = parseStringToArraySyncWASM(csv);
Performance Characteristics:
Limitations:
") as quotation characterimport { loadWASM, parseStringToArraySyncWASM } from "web-csv-toolbox";
// Recommended: Load WASM beforehand
await loadWASM();
const csv = "a,b,c\n1,2,3";
const result = parseStringToArraySyncWASM(csv);
console.log(result);
// Prints: [{ a: "1", b: "2", c: "3" }]
BetaParse CSV string to record of arrays using WebAssembly (synchronous).
CSV string to parse
Optionaloptions: CommonOptions<Delimiter, Quotation>Parse options
Record of arrays
This function uses WebAssembly to parse CSV string synchronously.
WASM Initialization: WASM module is automatically initialized on first use. However, it is recommended to call loadWASM beforehand for better performance.
// Recommended: Initialize WASM beforehand
import { loadWASM, parseStringToArraySyncWASM } from 'web-csv-toolbox';
await loadWASM();
const result = parseStringToArraySyncWASM(csv);
// Alternative: Automatic initialization (works but slower on first use)
import { parseStringToArraySyncWASM } from 'web-csv-toolbox';
const result = parseStringToArraySyncWASM(csv);
Performance Characteristics:
Limitations:
") as quotation characterimport { loadWASM, parseStringToArraySyncWASM } from "web-csv-toolbox";
// Recommended: Load WASM beforehand
await loadWASM();
const csv = "a,b,c\n1,2,3";
const result = parseStringToArraySyncWASM(csv);
console.log(result);
// Prints: [{ a: "1", b: "2", c: "3" }]
Parse CSV string to record of arrays using WebAssembly (synchronous).