Created
February 15, 2024 12:41
-
-
Save jlescalonap/0450c3c8b645ec759e14c4dbcb3ce0d4 to your computer and use it in GitHub Desktop.
CSV Simple parsing example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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