Simple CSV parser in TypeScript
- TypeScript
- Jest Unit Tests with Code Coverage
- GitHub CI Integration (feature, development, master, release)
- Publish via CI
- Code Quality via Code Climate
npm install @gregoranders/csvimport Parser from '@gregoranders/csv'; const parser = new Parser(); const rows = parser.parse('a,b,c\n1,2,3\n4,5,6');console.log(JSON.stringify(rows, null, 2)); [ [ "a", "b", "c" ], [ "1", "2", "3" ], [ "4", "5", "6" ] ]console.log(JSON.stringify(parser.rows, null, 2)); [ [ "a", "b", "c" ], [ "1", "2", "3" ], [ "4", "5", "6" ] ]console.log(JSON.stringify(parser.json, null, 2)); [ { "a": "1", "b": "2", "c": "3" }, { "a": "4", "b": "5", "c": "6" } ]git clone https://github.com/gregoranders/ts-csvnpm installnpm run buildTest using Jest
npm testCode Climate Checks docker required
npm run codeclimatenpm run clear