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