Skip to content

Instantly share code, notes, and snippets.

@jlescalonap
Created February 15, 2024 12:41
Show Gist options
  • Save jlescalonap/0450c3c8b645ec759e14c4dbcb3ce0d4 to your computer and use it in GitHub Desktop.
Save jlescalonap/0450c3c8b645ec759e14c4dbcb3ce0d4 to your computer and use it in GitHub Desktop.
CSV Simple parsing example
import fs from 'fs';
const matches = fs
.readFileSync('football.csv', {
encoding: 'utf-8',
})
.split('\n')
.map((row: string): string[] => {
return row.split(',');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment