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

Optimize json output format for frontend display #747

Open
winston0410 opened this issue Feb 11, 2023 · 1 comment
Open

Optimize json output format for frontend display #747

winston0410 opened this issue Feb 11, 2023 · 1 comment

Comments

@winston0410
Copy link

From this command, I get the following output.

npx browserslist --json
{
  "browsers": [
    "and_chr 109",
    "and_ff 109",
    "and_qq 13.1",
    "android 109",
    "chrome 109",
    "chrome 108",
    "chrome 107",
    "edge 109",
    "edge 108",
    "edge 107",
    "firefox 109",
    "firefox 108",
    "firefox 107",
    "firefox 102",
    "ios_saf 16.3",
    "ios_saf 16.2",
    "ios_saf 16.1",
    "ios_saf 16.0",
    "ios_saf 15.6",
    "ios_saf 15.5",
    "ios_saf 14.5-14.8",
    "node 19.3.0",
    "node 18.12.0",
    "node 16.19.0",
    "node 14.21.0",
    "op_mob 73",
    "opera 94",
    "opera 93",
    "safari 16.3",
    "safari 16.2",
    "safari 16.1",
    "safari 15.6",
    "samsung 19.0",
    "samsung 18.0"
  ]
}

The output is helpful for knowing what browser is supported, but it is not useful for displaying on a website to tell user which browser they should use. Right now I guess we will need custom parsing to turn transform the result first.

Not sure about the best format yet, but is this something @ai you would consider useful and include in this project? I would love to contribute if that is something you happy with

@ai
Copy link
Member

ai commented Feb 11, 2023

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

No branches or pull requests

2 participants