Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON output #50

Closed
Impostor-syndrome opened this issue Sep 21, 2020 · 5 comments · Fixed by #74
Closed

JSON output #50

Impostor-syndrome opened this issue Sep 21, 2020 · 5 comments · Fixed by #74

Comments

@Impostor-syndrome
Copy link

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.

@sindresorhus sindresorhus changed the title Feature request: csv/json output. JSON output Sep 21, 2020
@sindresorhus
Copy link
Owner

A --json flag would make sense. Not something I plan to work on, but a good pull request would be welcomed.

@seanmcne
Copy link

seanmcne commented Jan 5, 2021

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.

@jeffadavidson
Copy link

@seanmcne any update on the PR. I think its waiting for response to comments

@ernestclyde
Copy link

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]})

})`

@sindresorhus
Copy link
Owner

If anyone wants to work on this, see the initial attempt and feedback in #58.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants