https://github.com/padcom/inav-dump-parser
https://github.com/padcom/inav-dump-parser
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/padcom/inav-dump-parser
- Owner: padcom
- Created: 2022-02-14T15:24:31.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-02-14T19:10:57.000Z (over 4 years ago)
- Last Synced: 2025-01-04T13:18:59.727Z (over 1 year ago)
- Language: TypeScript
- Size: 188 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# INav dump parser library
This library helps you parse into objects all the entries from an INav dump.
## Example usage
First we need to load the content of the dump to memory.
Assuming you're using Node.js you can use `readFileSync` from `fs` package:
```
const lines = fs.readFileSync('./data/settings.txt').toString().split('\n')
```
Then you just need to instantiate the `SettingsParser` and call it's `parse(lines)` method:
```
import { SettingsParser } from 'inav-dump-parser'
const lines = fs.readFileSync('./data/settings.txt').toString().split('\n')
const items = new SettingsParser().parse(lines)
```