{"id":28267642,"url":"https://github.com/react-dropzone/attr-accept","last_synced_at":"2025-12-12T03:23:28.879Z","repository":{"id":47942005,"uuid":"42127547","full_name":"react-dropzone/attr-accept","owner":"react-dropzone","description":"JavaScript implementation of the \"accept\" attribute for HTML5 input element","archived":false,"fork":false,"pushed_at":"2024-11-25T12:23:13.000Z","size":1483,"stargazers_count":114,"open_issues_count":4,"forks_count":24,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-06-09T23:03:15.851Z","etag":null,"topics":["file","file-validation"],"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/react-dropzone.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,"zenodo":null},"funding":{"open_collective":"react-dropzone"}},"created_at":"2015-09-08T17:20:13.000Z","updated_at":"2025-04-17T13:23:45.000Z","dependencies_parsed_at":"2025-04-27T04:01:24.380Z","dependency_job_id":"01d8f289-53a5-4432-ab6c-ee43a2651621","html_url":"https://github.com/react-dropzone/attr-accept","commit_stats":{"total_commits":62,"total_committers":17,"mean_commits":"3.6470588235294117","dds":0.4516129032258065,"last_synced_commit":"66260177829f99c48594dd1fdedaefbb91bdce39"},"previous_names":["okonet/attr-accept"],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/react-dropzone/attr-accept","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-dropzone%2Fattr-accept","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-dropzone%2Fattr-accept/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-dropzone%2Fattr-accept/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-dropzone%2Fattr-accept/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/react-dropzone","download_url":"https://codeload.github.com/react-dropzone/attr-accept/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-dropzone%2Fattr-accept/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259911450,"owners_count":22930867,"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":["file","file-validation"],"created_at":"2025-05-20T15:11:16.220Z","updated_at":"2025-12-12T03:23:28.875Z","avatar_url":"https://github.com/react-dropzone.png","language":"JavaScript","readme":"# attr-accept\n\u003e JavaScript implementation of the \"accept\" attribute for HTML5 `\u003cinput type=\"file\"\u003e`\n\n[![npm](https://img.shields.io/npm/v/attr-accept.svg?style=flat-square)](https://www.npmjs.com/package/attr-accept)\n![Tests](https://img.shields.io/github/actions/workflow/status/react-dropzone/attr-accept/test.yml?branch=master\u0026style=flat-square\u0026label=tests)\n\nSee https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#attr-accept for more information.\n\n## Installation\n```sh\nnpm install --save attr-accept\n```\n\n## Usage\n```javascript\nvar accept = require('attr-accept');\naccept({\n    name: 'my file.png',\n    type: 'image/png'\n}, 'image/*') // =\u003e true\n\naccept({\n    name: 'my file.json',\n    type: 'application/json'\n}, 'image/*') // =\u003e false\n\naccept({\n    name: 'my file.srt',\n    type: ''\n}, '.srt') // =\u003e true\n```\n\nYou can also pass multiple mime types as a comma delimited string or array.\n```javascript\naccept({\n    name: 'my file.json',\n    type: 'application/json'\n}, 'application/json,video/*') // =\u003e true\n\naccept({\n    name: 'my file.json',\n    type: 'application/json'\n}, ['application/json', 'video/*']) // =\u003e true\n```\n\n## Contributing\n\nCheckout the organization [CONTRIBUTING.md](https://github.com/react-dropzone/.github/blob/main/CONTRIBUTING.md).\n","funding_links":["https://opencollective.com/react-dropzone"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-dropzone%2Fattr-accept","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freact-dropzone%2Fattr-accept","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-dropzone%2Fattr-accept/lists"}