{"name":"attr-accept","description":"JavaScript implementation of the \"accept\" attribute for HTML5 <input type=\"file\">","version":"2.2.1","main":"dist/index.js","module":"dist/es/index.js","types":"index.d.ts","scripts":{"clean":"rimraf ./dist","build":"npm run clean && npm run build:cjs && npm run build:es","build:cjs":"webpack -p","build:es":"cross-env BABEL_ENV=es babel ./src --out-dir ./dist/es --ignore '**/*.spec.js'","prepublish":"npm test && npm run build","pretest":"npm run lint","test":"mocha --compilers js:@babel/register --recursive","test:watch":"npm test -- --watch","lint":"eslint 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"},"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":{"@babel/cli":"^7.6.4","@babel/core":"^7.10.5","@babel/plugin-external-helpers":"^7.2.0","@babel/plugin-proposal-do-expressions":"^7.6.0","@babel/plugin-proposal-export-default-from":"^7.5.2","@babel/plugin-proposal-logical-assignment-operators":"^7.2.0","@babel/plugin-proposal-nullish-coalescing-operator":"^7.4.4","@babel/plugin-proposal-optional-chaining":"^7.6.0","@babel/plugin-proposal-pipeline-operator":"^7.5.0","@babel/plugin-transform-runtime":"^7.6.2","@babel/preset-env":"^7.6.3","@babel/preset-react":"^7.6.3","@babel/register":"^7.6.2","@commitlint/cli":"^8.2.0","@size-limit/preset-small-lib":"^2.1.6","babel-eslint":"^8.0.0","babel-loader":"^8.0.0","babel-preset-env":"^1.6.0","core-js":"^3.1.4","cross-env":"^6.0.3","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","mocha":"^3.5.0","prettier":"^1.6.1","rimraf":"^3.0.0","webpack":"^4.0.0","webpack-cli":"^3.3.12"},"engines":{"node":">=4"},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"lint-staged":{"*.js":["eslint --fix","git add"]},"size-limit":[{"path":"dist/index.js","limit":"2 KB"}],"gitHead":"5275b006fadb3607d0e3ca5bd9014e3fab00b29b","_id":"attr-accept@2.2.1","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-GpefLMsbH5ojNgfTW+OBin2xKzuHfyeNA+qCktzZojBhbA/lPZdCFMWdwk5ajb989Ok7ZT+EADqvW3TAFNMjhA==","shasum":"89b48de019ed4342f1865626b4389c666b3ed231","tarball":"http://registry-npm.ywwl.com/attr-accept/download/attr-accept-2.2.1.tgz","fileCount":14,"unpackedSize":17558,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfLf2gCRA9TVsSAnZWagAAgDcP/2VyWg3mQL1JG5/l3sUK\nsXk7liOfuCn8RnMsL6MYdn+bCl7MetkQUjpx2nMxah/HJ8zFWpiKIBbarjvB\nkKbpdA4ksmN70reiO1r+zBlD+i2pVGQJoOjxmnerFeFES+4PWs3K0ksBXZU6\ngkSJ2iubFws5fhPjIwbC5sghbIX/XUHx7MsZ1mUDOs8suMWhYjqsenbFfXYG\nCXUgRsZ6ROFw6Ky25BLfiOGIlWQ0CX+l/75cpeyFeGRKwPh7q7snjILny1Fz\nC2251fA0YAPnmfZZRwyHAsGMukRxhsraQ1rBQTdkV03xfJJvL4L3SexoKV16\ndNrfh+prf66mVbHt3gZ86njd0zk3e2QCQ4U7EhOM2aW5amQi3Ek0u0JEMwxb\nxspX1Bv5FhOxwehdWAUzZbdByyVZM6LQqviYPbfRIgi4uw8hvgKUcg3sPsTW\n/xc9GhNPhxYMoIooHfzGXDSFO0rzXUh58ZBRTXvTfJXH/7l1Afit5+x7wViK\nW5SZXu0jBJBD3G8FnrXPl4KwTAnhy85hzgb5TM8kmO2UeBDFv1ixBFWi5K/0\nwEsx6O0LqWqdtlMk0EvqQ+4vfhYf9uV/Wjr+JOBBzPIFAshZnu8xyveiyr3p\nhKBttQUUlloSvGMi967Oc/WnAo4mr89B86IBlg/Yb7i+j0Oi0DNlgKfPcTIO\nRaqY\r\n=Wbxn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAyBijlom00jvh4eM1iWiIsCzK+cBFrycQ6lBIYFnFDPAiBYfTLFHYW+iGWuOacAi/s3oLlsEAyBhD2qcG56BGf6iQ=="}],"size":5550,"noattachment":false,"key":"/attr-accept/-/attr-accept-2.2.1.tgz"},"maintainers":[{"email":"andrey@okonet.ru","name":"okonet"},{"email":"rolandjitsu@gmail.com","name":"rolandjitsu"},{"email":"rmarkins@gmail.com","name":"rxmarbles"}],"_npmUser":{"name":"rolandjitsu","email":"rolandjitsu@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/attr-accept_2.2.1_1596849567674_0.3957305728779523"},"_hasShrinkwrap":false,"readme":"# attr-accept\nJavaScript implementation of the \"accept\" attribute for HTML5 `<input type=\"file\">`\n\n![](https://github.com/react-dropzone/attr-accept/workflows/Test/badge.svg)\n[![npm version](https://badge.fury.io/js/attr-accept.svg)](https://badge.fury.io/js/attr-accept)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\nSee https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#accept for more information.\n\nInstallation\n=====\n```sh\nnpm install --save attr-accept\n```\n\nUsage\n=====\n```javascript\nvar accept = require('attr-accept');\naccept({\n    name: 'my file.png',\n    type: 'image/png'\n}, 'image/*') // => true\n\naccept({\n    name: 'my file.json',\n    type: 'application/json'\n}, 'image/*') // => false\n\naccept({\n    name: 'my file.srt',\n    type: ''\n}, '.srt') // => 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/*') // => true\n\naccept({\n    name: 'my file.json',\n    type: 'application/json'\n}, ['application/json', 'video/*']) // => true\n```\n","publish_time":1596849567800,"_cnpm_publish_time":1596849567800,"dist-tags":{"beta":"3.0.0-beta.1","latest":"4.0.1"}}