siesvi is CSV library that use typescript and provide CSV common functions from parsing, validation, to transformation.
npm install @maukode/siesvisiesvi is a lightweight yet powerful CSV processing library designed for Node.js. It provides essential functionalities for handling CSV files efficiently by leveraging the power of Node.js streams. This makes it suitable for processing large datasets without excessive memory consumption.
siesvi consists of two main types of components:
Csv class provides a simple and convenient way to handle CSV files. It acts as a wrapper around the available stream-based classes, managing the entire workflow from reading a CSV file to processing and writing it back.
siesvi.
ts
{ [key: string]: number | string | boolean | Date }
`
- Important: This class does not perform CSV format validation. To avoid processing errors, it is recommended to place CsvValidator before CsvParser in the processing pipeline.
$3
- Transforms a processed stream into a CSV-formatted file.
- Supports two output methods:
1. Writing directly to a file – Recommended for large datasets.
2. Saving to an internal buffer – Useful for temporary storage but not recommended for large data, as it may cause out-of-memory errors.
---
Usage Recommendations
- If you need a simple and efficient way to work with CSV files, use the Csv class.
- If you require more flexibility, build a custom pipeline using FileLoader, CsvValidator, CsvParser, and CsvWriter` as needed.