Gathering detailed insights and metrics for caniuse-api
Gathering detailed insights and metrics for caniuse-api
Gathering detailed insights and metrics for caniuse-api
Gathering detailed insights and metrics for caniuse-api
request the caniuse data to check browsers compatibilities
npm install caniuse-api
86.5
Supply Chain
99.4
Quality
77.5
Maintenance
100
Vulnerability
99.3
License
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
357 Stars
82 Commits
27 Forks
4 Watching
11 Branches
10 Contributors
Updated on 08 Nov 2024
Minified
Minified + Gzipped
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
-6%
1,867,422
Compared to previous day
Last week
1%
10,649,770
Compared to previous week
Last month
8.3%
45,106,836
Compared to previous month
Last year
-3.3%
497,315,494
Compared to previous year
request the caniuse data to check browsers compatibilities
1$ yarn add caniuse-api
1const caniuse = require('caniuse-api') 2 3caniuse.getSupport('border-radius') 4caniuse.isSupported('border-radius', 'ie 8, ie 9') 5caniuse.setBrowserScope('> 5%, last 1 version') 6caniuse.getSupport('border-radius') 7// ...
caniuse.getSupport(feature)
ask since which browsers versions a feature is available
y
: Since which browser version the feature is availablen
: Up to which browser version the feature is unavailablea
: Up to which browser version the feature is partially supportedx
: Up to which browser version the feature is prefixed1caniuse.getSupport('border-radius', true) 2/* 3{ and_chr: { y: 67 }, 4 and_ff: { y: 60 }, 5 and_qq: { y: 1.2 }, 6 and_uc: { y: 11.8 }, 7 android: { y: 2.1, x: 2.1 }, 8 baidu: { y: 7.12 }, 9 chrome: { y: 4, x: 4 }, 10 edge: { y: 12 }, 11 firefox: { a: 2, x: 3.6, y: 3 }, 12 ie: { n: 8, y: 9 }, 13 ie_mob: { y: 10 }, 14 ios_saf: { y: 3.2, x: 3.2 }, 15 op_mini: {}, 16 op_mob: { n: 10, y: 11 }, 17 opera: { n: 10, y: 10.5 }, 18 safari: { y: 3.1, x: 4 }, 19 samsung: { y: 4 } } 20*/
caniuse.isSupported(feature, browsers)
ask if a feature is supported by some browsers
1caniuse.isSupported('border-radius', 'ie 8, ie 9') // false
2caniuse.isSupported('border-radius', 'ie 9') // true
caniuse.find(query)
search for a caniuse feature name
Ex:
1caniuse.find('radius') // ['border-radius'] 2caniuse.find('nothingness') // [] 3caniuse.find('css3') 4/* 5[ 'css3-attr', 6 'css3-boxsizing', 7 'css3-colors', 8 'css3-cursors-grab', 9 'css3-cursors-newer', 10 'css3-cursors', 11 'css3-tabsize' ] 12*/
caniuse.getLatestStableBrowsers()
get the current version for each browser
1caniuse.getLatestStableBrowsers() 2/* 3[ 'and_chr 67', 4 'and_ff 60', 5 'and_qq 1.2', 6 'and_uc 11.8', 7 'android 67', 8 'baidu 7.12', 9 'bb 10', 10 'chrome 67', 11 'edge 17', 12 'firefox 61', 13 'ie 11', 14 'ie_mob 11', 15 'ios_saf 11.3-11.4', 16 'op_mini all', 17 'op_mob 46', 18 'opera 53', 19 'safari 11.1', 20 'samsung 7.2' ] 21*/
caniuse.getBrowserScope()
returns a list of browsers currently used for the scope of operations
1caniuse.getBrowserScope() 2/* 3[ 'and_chr', 4 'and_ff', 5 'and_qq', 6 'and_uc', 7 'android', 8 'baidu', 9 'chrome', 10 'edge', 11 'firefox', 12 'ie', 13 'ie_mob', 14 'ios_saf', 15 'op_mini', 16 'op_mob', 17 'opera', 18 'safari', 19 'samsung' ] 20*/
caniuse.setBrowserScope(browserscope)
if you do not like the default browser scope, you can set it globally by using this method
1caniuse.setBrowserScope('> 5%, last 2 versions, Firefox ESR, Opera 12.1')
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 7/22 approved changesets -- score normalized to 3
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
53 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More