JSON output
Impostor-syndrome opened this issue · comments
If you get time at one point, it would be great if a feature logging feature like you have in the speed-test repo.
If I knew how to port the functionality, I would have gladly done it, but I am still at the "one day i will have a look at nodejs" phase :)
All the best.
A --json
flag would make sense. Not something I plan to work on, but a good pull request would be welcomed.
Referencing to #56 - take a look at the PR and let me know if you think this type of output format would work for you.
Not the best but for someone looking a workaround until implemented
`const { exec } = require('child_process');
exec('./node_modules/fast-cli/cli.js -u --verbose --single-line', (err, stdout, stderr) => {
if (err) { console.log(err); return; }
console.log(stdout)
let x = stdout.match(/\d+\sMbps/g)
console.log({download: x[x.length - 2], upload: x[x.length - 1]})
})`
If anyone wants to work on this, see the initial attempt and feedback in #58.