CSV Manager parses uploaded files with theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/titobrian97/Prueba-tecnica-ts-node---gestion-de-csv/llms.txt
Use this file to discover all available pages before exploring further.
convert-csv-to-json library. The backend reads the raw file buffer as a UTF-8 string and passes it to csvStringToJson, producing an array of plain objects — one per data row. Getting the format right before uploading saves time and avoids confusing parse errors.
Requirements
| Requirement | Detail |
|---|---|
| Delimiter | Comma (,) — hardcoded via .fieldDelimiter(',') |
| Header row | Required as the first row; column names become JSON object keys |
| MIME type | Must be text/csv — enforced before parsing begins |
| Encoding | UTF-8 — the buffer is decoded with Buffer.from(file.buffer).toString('utf-8') |
| Value types | All fields become string after parsing — no type coercion occurs |
Example File
The repository ships with anexample.csv that exercises all eight standard columns. Here are the first four rows:
CSV Row → JSON Object Mapping
Each data row is converted to an object whose keys are taken from the header row. Every value is astring:
edad ("34") and id ("1") are strings even though they look like numbers. If your application logic needs numeric comparisons, convert with Number() or parseInt() after fetching the data.
Custom Column Names
You are not limited to the eight columns shown above. Any header row is accepted — the column names you place in row 1 become the keys in every JSON object returned by the API. For example:{ "sku": "A001", "product_name": "Widget Pro", "price": "19.99", "stock": "150" }.
Can I use a semicolon delimiter?
Can I use a semicolon delimiter?
No — not without modifying the backend source code. The server calls If your file uses semicolons (
.fieldDelimiter(',') unconditionally before parsing:;), tabs (\t), or any other separator, the library will treat each entire row as a single field, producing malformed objects. Convert your file to comma-delimited format first (most spreadsheet apps export this as CSV UTF-8 (Comma delimited)), or change the fieldDelimiter argument in server.ts to match your file’s separator.