The type of the header row
A parser instance configured for the specified output format
This function provides both compile-time and runtime type safety. The return type is determined by the outputFormat option:
outputFormat: 'object' (default) → BinaryObjectCSVParser (FlexibleBinaryObjectCSVParser)outputFormat: 'array' → BinaryArrayCSVParser (FlexibleBinaryArrayCSVParser)Design Intent: This factory function accepts options including engine configuration to enable future execution path optimization. The function may select the optimal internal parser implementation based on the provided options. Currently, this optimization is not implemented, but the API is designed to support it without breaking changes.
const parser = createBinaryCSVParser({
header: ['name', 'age'],
charset: 'utf-8',
decompression: 'gzip',
signal: abortController.signal,
});
const encoder = new TextEncoder();
for (const record of parser.parse(encoder.encode('Alice,30\nBob,25'))) {
console.log(record); // { name: 'Alice', age: '30' }
}
Factory function to create the appropriate Binary CSV parser based on options.
The type of the header row
A parser instance configured for the specified output format
This function provides both compile-time and runtime type safety. The return type is determined by the outputFormat option:
outputFormat: 'object' (default) → BinaryObjectCSVParser (FlexibleBinaryObjectCSVParser)outputFormat: 'array' → BinaryArrayCSVParser (FlexibleBinaryArrayCSVParser)Design Intent: This factory function accepts options including engine configuration to enable future execution path optimization. The function may select the optimal internal parser implementation based on the provided options. Currently, this optimization is not implemented, but the API is designed to support it without breaking changes.
const parser = createBinaryCSVParser({
header: ['name', 'age'],
charset: 'utf-8',
decompression: 'gzip',
signal: abortController.signal,
});
const encoder = new TextEncoder();
for (const record of parser.parse(encoder.encode('Alice,30\nBob,25'))) {
console.log(record); // { name: 'Alice', age: '30' }
}
Factory function to create the appropriate Binary CSV parser based on options.
The type of the header row
A parser instance configured for the specified output format
This function provides both compile-time and runtime type safety. The return type is determined by the outputFormat option:
outputFormat: 'object' (default) → BinaryObjectCSVParser (FlexibleBinaryObjectCSVParser)outputFormat: 'array' → BinaryArrayCSVParser (FlexibleBinaryArrayCSVParser)Design Intent: This factory function accepts options including engine configuration to enable future execution path optimization. The function may select the optimal internal parser implementation based on the provided options. Currently, this optimization is not implemented, but the API is designed to support it without breaking changes.
const parser = createBinaryCSVParser({
header: ['name', 'age'],
charset: 'utf-8',
decompression: 'gzip',
signal: abortController.signal,
});
const encoder = new TextEncoder();
for (const record of parser.parse(encoder.encode('Alice,30\nBob,25'))) {
console.log(record); // { name: 'Alice', age: '30' }
}
Factory function to create the appropriate Binary CSV parser based on options.
The type of the header row
Parser options including binary CSV processing specification and engine
A parser instance configured for the specified output format
This function provides both compile-time and runtime type safety. The return type is determined by the outputFormat option:
outputFormat: 'object' (default) → BinaryObjectCSVParser (FlexibleBinaryObjectCSVParser)outputFormat: 'array' → BinaryArrayCSVParser (FlexibleBinaryArrayCSVParser)Design Intent: This factory function accepts options including engine configuration to enable future execution path optimization. The function may select the optimal internal parser implementation based on the provided options. Currently, this optimization is not implemented, but the API is designed to support it without breaking changes.
const parser = createBinaryCSVParser({
header: ['name', 'age'],
charset: 'utf-8',
decompression: 'gzip',
signal: abortController.signal,
});
const encoder = new TextEncoder();
for (const record of parser.parse(encoder.encode('Alice,30\nBob,25'))) {
console.log(record); // { name: 'Alice', age: '30' }
}
Factory function to create the appropriate Binary CSV parser based on options.