{"name":"attr-accept","version":"1.0.2","description":"JavaScript implementation of the \"accept\" attribute for HTML5 <input type=\"file\">","main":"dist/index.js","scripts":{"build":"webpack -p","prepublish":"npm run check && npm run build","test":"mocha --compilers js:babel/register --recursive","test:watch":"npm test -- --watch","lint":"eslint ./src","check":"npm run lint && npm test"},"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","devDependencies":{"babel":"^5.8.23","babel-core":"5.8.25","babel-eslint":"^4.1.1","babel-loader":"5.3.2","core-js":"1.2.2","eslint":"^1.3.1","eslint-config-airbnb":"0.0.8","eslint-plugin-react":"^3.3.1","expect":"^1.9.0","mocha":"^2.3.2","webpack":"1.12.2"},"engines":{"node":">=0.10"},"gitHead":"7aefe6a71b33a7005f7c157bb18eca12f7bde24d","_id":"attr-accept@1.0.2","_shasum":"80f3a588ffc69fedbfe5b9590cd33a6f25806fa5","_from":".","_npmVersion":"2.12.1","_nodeVersion":"2.3.4","_npmUser":{"name":"okonet","email":"andrey@okonet.ru"},"maintainers":[{"name":"okonet","email":"andrey@okonet.ru"}],"dist":{"shasum":"80f3a588ffc69fedbfe5b9590cd33a6f25806fa5","tarball":"http://registry-npm.ywwl.com/attr-accept/download/attr-accept-1.0.2.tgz","integrity":"sha512-v1U4tGsIO0GePbTv2o/jpjzQhbw2/FLOjfasEgUpvwToS6NO2qtFgpqhspOZpHkd2Fl93OlJjSAsAIYNLidm3A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD97Z6jeojy/2uOkfzxZ2ic9oPGu4fbXlS+IheNnzRDjQIhAMwcCU40Wr/bFWV9BKH21nYzdfg9ZRzMWA/ABqGLRbER"}],"size":5873,"noattachment":false,"key":"/attr-accept/-/attr-accept-1.0.2.tgz"},"directories":{},"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":1445374892044,"_cnpm_publish_time":1445374892044,"dist-tags":{"beta":"3.0.0-beta.1","latest":"4.0.1"}}