{"_id":"attr-accept@4.0.0","bugs":{"url":"https://github.com/react-dropzone/attr-accept/issues"},"dist":{"shasum":"e038002c875830b2b98774918abfd4bdeb7d9c97","tarball":"http://registry-npm.ywwl.com/attr-accept/download/attr-accept-4.0.0.tgz","fileCount":10,"integrity":"sha512-hmCnJClmeKNKlsBHgbM8yLZRiQZ4/20UXbLJb6OUT16eWcM5/xNZerr80a/zCYob768KIGq++aLrQNTuwPsIOQ==","signatures":[{"sig":"MEQCIBIHnJf9YkEg2zRUxzzFA4e0y9hVUdju6/WCuS4rIYE7AiBRWI17VOF0Pfe0EVm2WilGRuipBW0hsJ0endGhu7ENjA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCvGMz+rmMc3ShFSUG6llZ92o0PM1iY077M1k7+I/2JeQIgJbQngcTpNOGvG2lH+ld4PUPSa7/D6PLfPtsQQYhHIyo="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/attr-accept@4.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":16787,"size":3988,"noattachment":false,"key":"/attr-accept/-/attr-accept-4.0.0.tgz"},"main":"./dist/index.cjs","name":"attr-accept","type":"module","types":"./dist/index.d.ts","author":{"name":"Andrey Okonetchnikov @okonetchnikov"},"module":"./dist/index.js","engines":{"node":">= 22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./package.json":"./package.json"},"gitHead":"d22b7be003d294d4c5a6b257a0afc15046e1d123","license":"MIT","scripts":{"dev":"tsdown --watch","lint":"oxlint","size":"size-limit","test":"vitest","build":"tsdown","clean":"rm -rf dist","format":"oxfmt .","prepare":"prek install || exit 0","presize":"npm run build","lint:fix":"oxlint --fix","prebuild":"npm run clean","test:cov":"vitest run --coverage","hooks:run":"prek run --all-files","type-check":"tsc --noEmit","pretest:cov":"npm run type-check && npm run lint && npm run format:check","format:check":"oxfmt --check .","hooks:install":"prek install","lint:type-aware":"oxlint --type-aware"},"version":"4.0.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:8f8d952e-727d-4bf1-b290-08cad5dbd899"}},"homepage":"https://github.com/react-dropzone/attr-accept#readme","keywords":["accept","attr","attribute","file","html5","input","tag"],"repository":{"url":"git+https://github.com/react-dropzone/attr-accept.git","type":"git"},"size-limit":[{"name":"esm","path":"dist/index.js","limit":"2 kB"},{"name":"cjs","path":"dist/index.cjs","limit":"2 kB"}],"_npmVersion":"11.19.0","description":"JavaScript implementation of the \"accept\" attribute for HTML5 <input type=\"file\">","directories":{},"maintainers":[{"name":"rolandjitsu","email":"rolandjitsu@gmail.com"}],"sideEffects":false,"_nodeVersion":"22.23.1","contributors":[{"url":"http://okonet.ru","name":"Andrey Okonetchnikov","email":"andrey@okonet.ru"},{"name":"Roland Groza","email":"rolandjitsu@gmail.com"}],"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"oxfmt":"^0.60.0","oxlint":"^1.75.0","tsdown":"^0.22.9","vitest":"^4.1.10","size-limit":"^12.1.0","typescript":"^7.0.2","@types/node":"^26.1.1","oxlint-tsgolint":"^0.24.0","@size-limit/file":"^12.1.0","@vitest/coverage-v8":"^4.1.10"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/attr-accept_4.0.0_1785657492163_0.9735348384833828"},"readme":"# attr-accept\n\n> JavaScript implementation of the \"accept\" attribute for HTML5 `<input type=\"file\">`\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=main&style=flat-square&label=tests)\n\nSee https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#attr-accept for more information.\n\nShips as both ES modules and CommonJS with bundled TypeScript type definitions.\n\n## Installation\n\n```sh\nnpm install --save attr-accept\n```\n\n## Usage\n\n```javascript\nimport accept from \"attr-accept\";\n\naccept(\n  {\n    name: \"my file.png\",\n    type: \"image/png\"\n  },\n  \"image/*\"\n); // => true\n\naccept(\n  {\n    name: \"my file.json\",\n    type: \"application/json\"\n  },\n  \"image/*\"\n); // => false\n\naccept(\n  {\n    name: \"my file.srt\",\n    type: \"\"\n  },\n  \".srt\"\n); // => true\n```\n\nYou can also pass multiple mime types as a comma delimited string or array.\n\n```javascript\naccept(\n  {\n    name: \"my file.json\",\n    type: \"application/json\"\n  },\n  \"application/json,video/*\"\n); // => true\n\naccept(\n  {\n    name: \"my file.json\",\n    type: \"application/json\"\n  },\n  [\"application/json\", \"video/*\"]\n); // => true\n```\n\nIn a CommonJS environment, use `require` instead:\n\n```javascript\nconst accept = require(\"attr-accept\");\n```\n\n## Contributing\n\nCheckout the organization [CONTRIBUTING.md](https://github.com/react-dropzone/.github/blob/main/CONTRIBUTING.md).\n","publish_time":1785657492239,"_cnpm_publish_time":1785657492239,"dist-tags":{"beta":"3.0.0-beta.1","latest":"4.0.1"}}