{"id":15376452,"url":"https://github.com/tomayac/fugu-api-data","last_synced_at":"2025-04-15T16:34:42.677Z","repository":{"id":57242707,"uuid":"379592592","full_name":"tomayac/fugu-api-data","owner":"tomayac","description":"This repo contains raw data for Project Fugu 🐡 APIs.","archived":false,"fork":false,"pushed_at":"2025-03-05T17:36:21.000Z","size":92,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T22:23:21.634Z","etag":null,"topics":["capabilities","fugu","project-fugu","web-capabilities"],"latest_commit_sha":null,"homepage":"https://github.com/tomayac/fugu-api-data","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tomayac.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-23T12:17:22.000Z","updated_at":"2025-03-05T17:36:25.000Z","dependencies_parsed_at":"2024-01-23T13:26:39.835Z","dependency_job_id":"6cdd8d5b-8aea-4e23-b72c-c3e1462723af","html_url":"https://github.com/tomayac/fugu-api-data","commit_stats":{"total_commits":41,"total_committers":1,"mean_commits":41.0,"dds":0.0,"last_synced_commit":"dbb19c33a1a9cecbc90ea84c2ad240bfdb302d9e"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomayac%2Ffugu-api-data","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomayac%2Ffugu-api-data/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomayac%2Ffugu-api-data/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomayac%2Ffugu-api-data/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomayac","download_url":"https://codeload.github.com/tomayac/fugu-api-data/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248662269,"owners_count":21141544,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["capabilities","fugu","project-fugu","web-capabilities"],"created_at":"2024-10-01T14:07:33.812Z","updated_at":"2025-04-15T16:34:42.661Z","avatar_url":"https://github.com/tomayac.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Project Fugu\u0026nbsp;🐡 API Data\n\nThis repo contains raw data for Project Fugu\u0026nbsp;🐡 APIs. The data is available\nin two formats: `pattern.js` and `pattern.mjs`.\n\n## Data origin\n\nThe raw data in this repository comes from a\n[Google spreadsheet](https://docs.google.com/spreadsheets/d/1ndxh6sl0fSOLHFlMdSiLPqmGPMDVJqkJFYnQ0Hsmhwo/edit?usp=sharing)\nthat is published as a\n[JSON file](https://sheets.googleapis.com/v4/spreadsheets/1ndxh6sl0fSOLHFlMdSiLPqmGPMDVJqkJFYnQ0Hsmhwo/values/Sheet2?alt=json\u0026key=AIzaSyCkROWBarEOJ9hQJggyrlUFulOFA4h6AW0).\nThe `index.js` script fetches this data, prettifies it, and saves it locally in\na module and in a no-module variant.\n\n## Obtaining fresh data\n\nYou can trigger the data fetch process described above by running the `start`\nscript:\n\n```bash\nnpm start\n```\n\n## Data usage\n\n- For the module version:\n\n  ```js\n  import patterns from './patterns.mjs';\n\n  console.log(patterns.WebBluetooth);\n  /*\n  {\n    regEx: /navigator\\.bluetooth\\.requestDevice\\s*\\(/g,\n    where: 'JavaScript',\n    supported: (async () =\u003e 'bluetooth' in navigator)(),\n    featureDetection: `(async () =\u003e 'bluetooth' in navigator)()`,\n  }\n  */\n  ```\n\n- For the no-module version (for example to use it in a service worker):\n  ```js\n  importScripts('patterns.js');\n  console.log(patterns.WebBluetooth);\n  /*\n  {\n    regEx: /navigator\\.bluetooth\\.requestDevice\\s*\\(/g,\n    where: 'JavaScript',\n    supported: (async () =\u003e 'bluetooth' in navigator)(),\n    featureDetection: `(async () =\u003e 'bluetooth' in navigator)()`,\n  }\n  */\n  ```\n\n## Data format\n\nEach API is represented as an object with the following properties:\n\n- `regEx`: A regular expression that you can use to detect the API of interest\n  in source code when you do static source code analysis.\n- `where`: The resource type where the regular expression needs to match in\n  order to be valid. Either `\"JavaScript\"` or `\"Web App Manifest\"`.\n- `supported`: A function that returns a promise that resolves with `true`,\n  `false`, or `undefined`, dependent on whether the API is supported or not\n  (`undefined` means no feature detection method exists).\n- `featureDetection`: The source code of the feature detection method, so you\n  can use it in an `eval()` for example.\n\n## Depending projects\n\nThis data is used in the following projects:\n\n- The\n  [Capabilities report](https://almanac.httparchive.org/en/2020/capabilities) of\n  the [HTTP Almanac](https://almanac.httparchive.org/) in the file\n  [`custom_metrics/fugu-apis.js`](https://github.com/HTTPArchive/legacy.httparchive.org/blob/master/custom_metrics/fugu-apis.js).\n- The\n  [Project Fugu\u0026nbsp;🐡 API Detector](https://github.com/tomayac/project-fugu-api-detector)\n  browser extension in the files\n  [`patternsFunc.js`](https://github.com/tomayac/project-fugu-api-detector/blob/main/patternsFunc.js#:~:text=import%20patterns%20from%20'.%2Fpatterns.mjs'%3B)\n  and\n  [`background.js`](\u003chttps://github.com/tomayac/project-fugu-api-detector/blob/main/background.js#:~:text=importscripts(%5B'patterns.js'%5D)%3B\u003e).\n\n## License\n\nApache 2.0.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomayac%2Ffugu-api-data","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomayac%2Ffugu-api-data","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomayac%2Ffugu-api-data/lists"}