{"name":"attr-accept","version":"3.0.0","keywords":["html5","input","tag","attribute","attr","accept","file"],"author":{"name":"Andrey Okonetchnikov @okonetchnikov"},"license":"MIT","_id":"attr-accept@3.0.0","contributors":[{"url":"http://okonet.ru","name":"Andrey Okonetchnikov","email":"andrey@okonet.ru"},{"name":"Roland Groza","email":"rolandjitsu@gmail.com"}],"homepage":"https://github.com/react-dropzone/attr-accept#readme","bugs":{"url":"https://github.com/react-dropzone/attr-accept/issues"},"dist":{"shasum":"1109c6f3bc6f0b3aca2e0795851a69a4df155962","tarball":"http://registry-npm.ywwl.com/attr-accept/download/attr-accept-3.0.0.tgz","fileCount":5,"integrity":"sha512-X3Pb1cGcUOPHgPBhdSc1WDAKZeOMOn0inOpEbjXwlBAdjINN/mqaxW/T01SSz8fIKFV2uoI84EwXap5loUqDGw==","signatures":[{"sig":"MEUCIQDrJHxvV7HZu+1tO9jnt1S0lrch5Honsrw09zRaaCLz6AIgRFl5+3qj9+cUEWUR2j3nhKwS+aA251sV19c06MkjDUg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6070,"size":2719,"noattachment":false,"key":"/attr-accept/-/attr-accept-3.0.0.tgz"},"type":"module","types":"./index.d.ts","config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"engines":{"node":">=18"},"exports":{"types":"./index.d.ts","default":"./src/index.js"},"gitHead":"9d9322d78829db81b1fef605e938941a676c45bd","scripts":{"lint":"eslint src/ test/","size":"size-limit","test":"node --test","pretest":"npm run lint","lint:fix":"eslint --fix src/ test/","size:why":"size-limit --why","precommit":"lint-staged","prepublish":"npm test","test:watch":"node --test --watch","test:coverage":"node --test --experimental-test-coverage --test-reporter=lcov --test-reporter-destination=lcov.info"},"_npmUser":{"name":"rolandjitsu","email":"rolandjitsu@gmail.com"},"deprecated":"This version was accidental","repository":{"url":"git+https://github.com/react-dropzone/attr-accept.git","type":"git"},"size-limit":[{"path":"src/index.js","limit":"2 KB"}],"_npmVersion":"10.9.0","description":"JavaScript implementation of the \"accept\" attribute for HTML5 <input type=\"file\">","directories":{},"lint-staged":{"*.js":["eslint --fix","git add"]},"_nodeVersion":"22.10.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"husky":"^0.14.3","eslint":"^4.6.1","expect":"^1.20.2","prettier":"^1.6.1","lint-staged":"^4.1.3","@commitlint/cli":"^8.2.0","eslint-plugin-node":"^5.1.1","@size-limit/esbuild":"^11.1.6","eslint-plugin-react":"^7.3.0","eslint-config-airbnb":"^15.1.0","eslint-config-okonet":"^6.1.3","eslint-plugin-import":"^2.7.0","eslint-config-prettier":"^2.4.0","eslint-plugin-flowtype":"^2.35.1","eslint-plugin-jsx-a11y":"^5.1.1","eslint-plugin-prettier":"^2.2.0","@size-limit/esbuild-why":"^11.1.6","cz-conventional-changelog":"^1.2.0","@size-limit/preset-small-lib":"^11.1.6"},"_npmOperationalInternal":{"tmp":"tmp/attr-accept_3.0.0_1731326497406_0.5457478984341055","host":"s3://npm-registry-packages"},"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":1731326497558,"maintainers":[{"name":"rolandjitsu","email":"rolandjitsu@gmail.com"}],"_cnpm_publish_time":1731326497558,"dist-tags":{"beta":"3.0.0-beta.1","latest":"4.0.1"}}