{"id":13547840,"url":"https://github.com/Nyalab/caniuse-api","last_synced_at":"2025-04-02T20:30:56.330Z","repository":{"id":24347516,"uuid":"27745544","full_name":"Nyalab/caniuse-api","owner":"Nyalab","description":"request the caniuse data to check browsers compatibilities","archived":false,"fork":false,"pushed_at":"2024-05-05T22:02:13.000Z","size":171,"stargazers_count":358,"open_issues_count":30,"forks_count":27,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-23T12:07:54.802Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Nyalab.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2014-12-09T02:23:07.000Z","updated_at":"2024-12-24T11:46:02.000Z","dependencies_parsed_at":"2024-06-18T12:18:49.538Z","dependency_job_id":"7e3aa23b-5631-4d1c-b530-db088b83077e","html_url":"https://github.com/Nyalab/caniuse-api","commit_stats":{"total_commits":69,"total_committers":11,"mean_commits":"6.2727272727272725","dds":0.5217391304347826,"last_synced_commit":"1b74c10257e36877709da4f6630513db10203a78"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nyalab%2Fcaniuse-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nyalab%2Fcaniuse-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nyalab%2Fcaniuse-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nyalab%2Fcaniuse-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nyalab","download_url":"https://codeload.github.com/Nyalab/caniuse-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245605728,"owners_count":20643030,"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":[],"created_at":"2024-08-01T12:01:01.752Z","updated_at":"2025-04-02T20:30:51.321Z","avatar_url":"https://github.com/Nyalab.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# caniuse-api [![Build Status](https://travis-ci.org/Nyalab/caniuse-api.svg?branch=master)](https://travis-ci.org/Nyalab/caniuse-api) [![Build status](https://ci.appveyor.com/api/projects/status/6j3na522bv3bxfa5/branch/master?svg=true)](https://ci.appveyor.com/project/MoOx/caniuse-api/branch/master)\n\nrequest the caniuse data to check browsers compatibilities\n\n## Installation\n\n```console\n$ yarn add caniuse-api\n```\n\n## Usage\n\n```js\nconst caniuse = require('caniuse-api')\n\ncaniuse.getSupport('border-radius')\ncaniuse.isSupported('border-radius', 'ie 8, ie 9')\ncaniuse.setBrowserScope('\u003e 5%, last 1 version')\ncaniuse.getSupport('border-radius')\n// ...\n```\n\n## API\n\n#### `caniuse.getSupport(feature)`\n\n_ask since which browsers versions a feature is available_\n\n* `y`: Since which browser version the feature is available\n* `n`: Up to which browser version the feature is unavailable\n* `a`: Up to which browser version the feature is partially supported\n* `x`: Up to which browser version the feature is prefixed\n\n```js\ncaniuse.getSupport('border-radius', true)\n/*\n{ and_chr: { y: 67 },\n  and_ff: { y: 60 },\n  and_qq: { y: 1.2 },\n  and_uc: { y: 11.8 },\n  android: { y: 2.1, x: 2.1 },\n  baidu: { y: 7.12 },\n  chrome: { y: 4, x: 4 },\n  edge: { y: 12 },\n  firefox: { a: 2, x: 3.6, y: 3 },\n  ie: { n: 8, y: 9 },\n  ie_mob: { y: 10 },\n  ios_saf: { y: 3.2, x: 3.2 },\n  op_mini: {},\n  op_mob: { n: 10, y: 11 },\n  opera: { n: 10, y: 10.5 },\n  safari: { y: 3.1, x: 4 },\n  samsung: { y: 4 } }\n*/\n```\n\n#### `caniuse.isSupported(feature, browsers)`\n\n_ask if a feature is supported by some browsers_\n\n```js\ncaniuse.isSupported('border-radius', 'ie 8, ie 9') // false\ncaniuse.isSupported('border-radius', 'ie 9') // true\n```\n\n#### `caniuse.find(query)`\n\n_search for a caniuse feature name_\n\nEx:\n\n```js\ncaniuse.find('radius') // ['border-radius']\ncaniuse.find('nothingness') // []\ncaniuse.find('css3')\n/*\n[ 'css3-attr',\n  'css3-boxsizing',\n  'css3-colors',\n  'css3-cursors-grab',\n  'css3-cursors-newer',\n  'css3-cursors',\n  'css3-tabsize' ]\n*/\n```\n\n#### `caniuse.getLatestStableBrowsers()`\n\n_get the current version for each browser_\n\n```js\ncaniuse.getLatestStableBrowsers()\n/*\n[ 'and_chr 67',\n  'and_ff 60',\n  'and_qq 1.2',\n  'and_uc 11.8',\n  'android 67',\n  'baidu 7.12',\n  'bb 10',\n  'chrome 67',\n  'edge 17',\n  'firefox 61',\n  'ie 11',\n  'ie_mob 11',\n  'ios_saf 11.3-11.4',\n  'op_mini all',\n  'op_mob 46',\n  'opera 53',\n  'safari 11.1',\n  'samsung 7.2' ]\n*/\n```\n\n#### `caniuse.getBrowserScope()`\n\n_returns a list of browsers currently used for the scope of operations_\n\n```js\ncaniuse.getBrowserScope()\n/*\n[ 'and_chr',\n  'and_ff',\n  'and_qq',\n  'and_uc',\n  'android',\n  'baidu',\n  'chrome',\n  'edge',\n  'firefox',\n  'ie',\n  'ie_mob',\n  'ios_saf',\n  'op_mini',\n  'op_mob',\n  'opera',\n  'safari',\n  'samsung' ]\n*/\n```\n\n#### `caniuse.setBrowserScope(browserscope)`\n\n_if you do not like the default browser scope, you can set it globally by using this method_\n\n* browserscope should be a 'autoprefixer' formatted string\n\n```js\ncaniuse.setBrowserScope('\u003e 5%, last 2 versions, Firefox ESR, Opera 12.1')\n```\n\n\n---\n\n## [Changelog](CHANGELOG.md)\n\n## [License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNyalab%2Fcaniuse-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FNyalab%2Fcaniuse-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNyalab%2Fcaniuse-api/lists"}