Gathering detailed insights and metrics for attr-accept
Gathering detailed insights and metrics for attr-accept
Gathering detailed insights and metrics for attr-accept
Gathering detailed insights and metrics for attr-accept
JavaScript implementation of the "accept" attribute for HTML5 input element
npm install attr-accept
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
112 Stars
89 Commits
24 Forks
8 Watching
11 Branches
15 Contributors
Updated on 16 Nov 2024
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
-6.5%
613,113
Compared to previous day
Last week
2.4%
3,372,328
Compared to previous week
Last month
8.3%
14,350,993
Compared to previous month
Last year
15.3%
153,472,113
Compared to previous year
40
JavaScript implementation of the "accept" attribute for HTML5
<input type="file">
See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#attr-accept for more information.
1npm install --save attr-accept
1var accept = require('attr-accept'); 2accept({ 3 name: 'my file.png', 4 type: 'image/png' 5}, 'image/*') // => true 6 7accept({ 8 name: 'my file.json', 9 type: 'application/json' 10}, 'image/*') // => false 11 12accept({ 13 name: 'my file.srt', 14 type: '' 15}, '.srt') // => true
You can also pass multiple mime types as a comma delimited string or array.
1accept({ 2 name: 'my file.json', 3 type: 'application/json' 4}, 'application/json,video/*') // => true 5 6accept({ 7 name: 'my file.json', 8 type: 'application/json' 9}, ['application/json', 'video/*']) // => true
Checkout the organization CONTRIBUTING.md.
No vulnerabilities found.
Reason
24 commit(s) and 10 issue activity found in the last 90 days -- score normalized to 10
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
packaging workflow detected
Details
Reason
Found 7/14 approved changesets -- score normalized to 5
Reason
dependency not pinned by hash detected -- score normalized to 4
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
40 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