{"name":"attr-accept","description":"JavaScript implementation of the \"accept\" attribute for HTML5 <input type=\"file\">","version":"1.1.2","main":"dist/index.js","scripts":{"build":"webpack -p","prepublish":"npm test && npm run build","pretest":"npm run lint","test":"mocha --compilers js:babel-core/register --recursive","test:watch":"npm test -- --watch","lint":"eslint src/ test/","precommit":"lint-staged","travis-deploy-once":"travis-deploy-once"},"repository":{"type":"git","url":"git+https://github.com/okonet/attr-accept.git"},"keywords":["html5","input","tag","attribute","attr","accpet","file"],"author":{"name":"Andrey Okonetchnikov @okonetchnikov"},"license":"MIT","bugs":{"url":"https://github.com/okonet/attr-accept/issues"},"homepage":"https://github.com/okonet/attr-accept#readme","dependencies":{"core-js":"^2.5.0"},"devDependencies":{"babel-core":"^6.26.0","babel-eslint":"^8.0.0","babel-loader":"^7.1.2","babel-preset-env":"^1.6.0","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","travis-deploy-once":"^4.3.4","webpack":"^3.5.5"},"engines":{"node":">=4"},"config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"lint-staged":{"*.js":["eslint --fix","git add"]},"gitHead":"d1c7cdeed4ffa7081bf6a6fb2b7e55815750e354","_id":"attr-accept@1.1.2","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"okonet","email":"andrey@okonet.ru"},"dist":{"integrity":"sha512-NUj0itVSnpFkUYCj3XKSRCZ7N9gPwWcyX/tF7HosqyDBPMSygALivvJIGI8VvlPcunns5khMkpxoNshvmhy/ZQ==","shasum":"6836bfe054e4ef1ee3076fdde56cec9bb3ffead6","tarball":"http://registry-npm.ywwl.com/attr-accept/download/attr-accept-1.1.2.tgz","fileCount":11,"unpackedSize":20413,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDFFD4QcxAVciDNiMZ+0G64g+/7Gwau9T38IhdSOn20IgIgM5vqY4vcnb2koIBEJrlcORtzkQxtzd2iwMGo8mheKRo="}],"size":6695,"noattachment":false,"key":"/attr-accept/-/attr-accept-1.1.2.tgz"},"maintainers":[{"name":"okonet","email":"andrey@okonet.ru"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/attr-accept_1.1.2_1518797281600_0.3014714066181592"},"_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":1518797281647,"_cnpm_publish_time":1518797281647,"dist-tags":{"beta":"3.0.0-beta.1","latest":"4.0.1"}}