The type of the header row
CSV processing specification (excludes execution strategy)
A parser instance configured for the specified output format
This is a low-level factory function that accepts CSVProcessingOptions. It does NOT accept execution strategy options (engine). For high-level APIs with execution strategy support, use parseString() and related functions.
This function provides both compile-time and runtime type safety. The return type is determined by the outputFormat option:
outputFormat: 'object' (default) → StringObjectCSVParser (FlexibleStringObjectCSVParser)outputFormat: 'array' → StringArrayCSVParser (FlexibleStringArrayCSVParser)const parser = createStringCSVParser({
header: ['name', 'age'] as const,
delimiter: ',',
signal: abortController.signal,
// engine is NOT available (low-level API)
});
for (const record of parser.parse('Alice,30\nBob,25')) {
console.log(record); // { name: 'Alice', age: '30' }
}
Factory function to create the appropriate String CSV parser based on options.
The type of the header row
CSV processing specification (excludes execution strategy)
A parser instance configured for the specified output format
This is a low-level factory function that accepts CSVProcessingOptions. It does NOT accept execution strategy options (engine). For high-level APIs with execution strategy support, use parseString() and related functions.
This function provides both compile-time and runtime type safety. The return type is determined by the outputFormat option:
outputFormat: 'object' (default) → StringObjectCSVParser (FlexibleStringObjectCSVParser)outputFormat: 'array' → StringArrayCSVParser (FlexibleStringArrayCSVParser)const parser = createStringCSVParser({
header: ['name', 'age'] as const,
delimiter: ',',
signal: abortController.signal,
// engine is NOT available (low-level API)
});
for (const record of parser.parse('Alice,30\nBob,25')) {
console.log(record); // { name: 'Alice', age: '30' }
}
Factory function to create the appropriate String CSV parser based on options.
The type of the header row
CSV processing specification (excludes execution strategy)
A parser instance configured for the specified output format
This is a low-level factory function that accepts CSVProcessingOptions. It does NOT accept execution strategy options (engine). For high-level APIs with execution strategy support, use parseString() and related functions.
This function provides both compile-time and runtime type safety. The return type is determined by the outputFormat option:
outputFormat: 'object' (default) → StringObjectCSVParser (FlexibleStringObjectCSVParser)outputFormat: 'array' → StringArrayCSVParser (FlexibleStringArrayCSVParser)const parser = createStringCSVParser({
header: ['name', 'age'] as const,
delimiter: ',',
signal: abortController.signal,
// engine is NOT available (low-level API)
});
for (const record of parser.parse('Alice,30\nBob,25')) {
console.log(record); // { name: 'Alice', age: '30' }
}
Factory function to create the appropriate String CSV parser based on options.
The type of the header row
Optionaloptions: CSVProcessingOptions<Header, ",", "\"">CSV processing specification (excludes execution strategy)
A parser instance configured for the specified output format
This is a low-level factory function that accepts CSVProcessingOptions. It does NOT accept execution strategy options (engine). For high-level APIs with execution strategy support, use parseString() and related functions.
This function provides both compile-time and runtime type safety. The return type is determined by the outputFormat option:
outputFormat: 'object' (default) → StringObjectCSVParser (FlexibleStringObjectCSVParser)outputFormat: 'array' → StringArrayCSVParser (FlexibleStringArrayCSVParser)const parser = createStringCSVParser({
header: ['name', 'age'] as const,
delimiter: ',',
signal: abortController.signal,
// engine is NOT available (low-level API)
});
for (const record of parser.parse('Alice,30\nBob,25')) {
console.log(record); // { name: 'Alice', age: '30' }
}
Factory function to create the appropriate String CSV parser based on options.