Productivity
A CSV parser for files exported from myFlightRadar24, returning structured flight data including airports, aircraft, and related information.
# via yarn
yarn add @imikailoby/fr24-csv-parser
# via npm
npm install @imikailoby/fr24-csv-parser
FRParser
class into your project..parse(yourCsvString)
method, passing in the CSV content.Example:
<input type="file" id="csvInput" accept=".csv" />
<script type="module">
import { FRParser } from '@imikailoby/fr24-csv-parser';
const frParser = new FRParser();
const fileInput = document.getElementById('csvInput');
fileInput.addEventListener('change', () => {
const files = fileInput.files;
if (!files || files.length === 0) return;
const file = files[0];
const reader = new FileReader();
reader.onload = (e) => {
const content = e.target?.result;
const result = frParser.parse(content);
// Do something with the parsed data...
};
reader.readAsText(file);
});
</script>