Menu

1 / 3

A TypeScript CSV Importer That Refuses to Guess Your Fuel History

DEV Community: reactnative·Rafael Soares·3 days ago
#9zZoCjAU
#devtoreactnative#devto#dev#date#file
Reading 0:00
15s threshold

03/09/2026 is a valid date in two different histories.

If I import it as March 9 when the user meant September 3, the parser does not throw. The database accepts the record. The timeline looks tidy. Every report built on top of that date is now wrong.

This is the problem I wanted the CSV importer in OdoKeep to handle: mistakes that produce valid data.

OdoKeep is a vehicle logbook built with React Native, Expo, and TypeScript. Someone trying it may already have years of fuel entries in another app or a spreadsheet. Making them leave that history behind creates a substantial cost before they have even decided whether they like the new app.

Reading a CSV is one part of lowering that cost. Preserving what its numbers mean is the larger part.

Inspect, build, then write

The implementation lives in lib/csv-import.ts and has two distinct outputs. Inspection produces the parsed table, suggested column mappings, detected source, conventions, and unresolved questions.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.