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

List of all features? #6138

Closed
ireade opened this issue May 12, 2020 · 3 comments
Closed

List of all features? #6138

ireade opened this issue May 12, 2020 · 3 comments
Labels
idle Issues and pull requests with no recent activity question Issues where a question or problem is stated and a discussion is held to gather opinions.

Comments

@ireade
Copy link

ireade commented May 12, 2020

Hi! I'm working on a project that provides an embeddable widget for caniuse data, and I'm working on extending it to also include MDN data, e.g. https://caniuse.bitsofco.de/embed/index.html?feat=mdn-api_AbortController

I was wondering if there was one source that lists all the feature identifiers? e.g. a list that would include something like ["api/AbortController", "css/properties/charset"] and so on.

@Elchi3
Copy link
Member

Elchi3 commented May 12, 2020

Hey, thanks for reaching out! That sounds like a very interesting project. I would like to learn more about it!
If you have the compat data npm package installed, you could then maybe inspect the object tree to see what's exposed?

const bcd = require('mdn-browser-compat-data');
Object.keys(bcd); 
// returns
[
  'api',       'browsers',
  'css',       'html',
  'http',      'javascript',
  'mathml',    'svg',
  'webdriver', 'webextensions',
  'xpath',     'xslt'
]

Object.keys(bcd.api);
// returns
[
  'ANGLE_instanced_arrays',
  'AbortController',
  'AbortPaymentEvent',
  'AbortSignal',
  'AbsoluteOrientationSensor',
  'AbstractRange',
  'AbstractWorker',
  ...
]

If you walk the trees, you can stop at __compat as that's not an feature identifier, but the object actually containing the compat data.

Let me know if this is helpful or if you have any other questions.

@Elchi3 Elchi3 added the question Issues where a question or problem is stated and a discussion is held to gather opinions. label May 12, 2020
@ireade
Copy link
Author

ireade commented May 12, 2020

Thanks for the quick response @Elchi3 ! I will try that approach

This is the project in case you're interested - https://caniuse.bitsofco.de/ !

@github-actions github-actions bot added the idle Issues and pull requests with no recent activity label May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idle Issues and pull requests with no recent activity question Issues where a question or problem is stated and a discussion is held to gather opinions.
Projects
None yet
Development

No branches or pull requests

4 participants
@Elchi3 @queengooborg @ireade and others