{"_id":"validate-image-type","_rev":"6-bb87d51e8b4154df6352b17ec694d351","name":"validate-image-type","dist-tags":{"latest":"3.0.0"},"versions":{"1.0.1":{"name":"validate-image-type","version":"1.0.1","description":"Check the image file of a Buffer/Uint8Array that matched expected image MIME-type.","keywords":["image","bufffer","mime-type","extension","validate","valicator","png","jpg","svg"],"homepage":"https://github.com/azu/validate-image-type","bugs":{"url":"https://github.com/azu/validate-image-type/issues"},"repository":{"type":"git","url":"git+https://github.com/azu/validate-image-type.git"},"license":"MIT","author":{"name":"azu"},"main":"lib/validate-image-type.js","types":"lib/validate-image-type.d.ts","directories":{"lib":"lib","test":"test"},"scripts":{"build":"cross-env NODE_ENV=production tsc -p .","clean":"rimraf lib/","prettier":"prettier --write \"**/*.{js,jsx,ts,tsx,css}\"","prepublish":"npm run --if-present build","test":"mocha \"test/**/*.ts\"","watch":"tsc -p . --watch"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{js,jsx,ts,tsx,css}":["prettier --write","git add"]},"prettier":{"printWidth":120,"singleQuote":false,"tabWidth":4},"dependencies":{"image-type":"^4.1.0","is-svg":"^4.2.1","read-chunk":"^3.2.0"},"devDependencies":{"@types/mocha":"^7.0.2","@types/node":"^14.0.5","cross-env":"^7.0.2","husky":"^4.2.5","lint-staged":"^10.2.4","mocha":"^7.1.2","prettier":"^2.0.5","rimraf":"^3.0.2","ts-node":"^8.10.1","ts-node-test-register":"^8.0.1","typescript":"^3.9.3"},"gitHead":"d0a493ad90f20c51aeb4afe27bfad8d4862285f7","_id":"validate-image-type@1.0.1","_nodeVersion":"12.12.0","_npmVersion":"6.14.4","_npmUser":{"name":"azu","email":"azuciao@gmail.com"},"dist":{"integrity":"sha512-beRc2dMmohvqoOG27MEnxuAGs9hj4hVjPCkrKBVtVwjAO3RDxyXtJ4d65H/5XV+eKdPla5XYPmtJNZgRsWp4lw==","shasum":"dfbb169496ecff867ffe17b4993fdafa0c0be742","tarball":"https://registry.npmjs.org/validate-image-type/-/validate-image-type-1.0.1.tgz","fileCount":7,"unpackedSize":12077,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJexzStCRA9TVsSAnZWagAAZR4QAJ9WUi9eeEqF+lqOpmHY\nTygaWNG54yQV/vIrkwvID+vudB3Qlx8n04ZEruViWIcRB/YjtXugciEwX3k/\npnwrhMYcuzjBCSX4++kv5B1bzdb/CZkqvqfGiLEj9JYYM2hFiyHwlfJqtVL/\nNQZvE62ahYafBf+u+004TI3GP9htRJBKeY8zICd5mtNO6AX6isZi9KJLV0TO\nCbD4nn/nAndBfzsOVht5KBFfDP2ZdZa1/RkCvFBjnZmTOYS/kHoy1JwxFIl8\n6cSzaNqKBy3rkYuCl6KRBvg2MFPiijyJFlBQhpYnZcunlympx0Lf6RORtuHh\n+j69f981lFbhM0hPYY8QOAjG5prmgn8uPMxTdTa6QxGK/yDf2B+P5DzE3riI\nOQW4S0O2lh6XH4yk2kBYLKCMC3wh5iPg2KirvCgkmThR4PuirrCv3MF/Fr8S\nSGKhj/yv2i1I2JgoQXDnDNaTXM1x4yMrXMnR6cqyFmTLvLSsI0srErS/91ah\n0mSsj1ZFeQlpLUto+UBofsKvunl4AWeYs038wXg/YzE1NsE0ULD3t3aV0HCW\n63fb91RHbiWJStdrM2Nic7/s2rEFeGWnszU9viJ+17gPDzvsHv/2t9wlfVZs\nMs9kyrJzQdRZyK9+nRejKt+Dk01N/qTkDdo+GcDxbHDW0YKXrBgng2vUrDIh\n85uN\r\n=Gb4c\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICeWeLOcDbDfWifvfAJ4NWYSPUTaKPi7JbFOfNAsJxtNAiB1pl6fZgN8NuRwDXnMUPxAFSh7+sB5Y6LO2Dpvw2/rdA=="}]},"maintainers":[{"name":"azu","email":"azuciao@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/validate-image-type_1.0.1_1590113452474_0.6713113023116544"},"_hasShrinkwrap":false},"1.1.0":{"name":"validate-image-type","version":"1.1.0","description":"Check the image file of a Buffer/Uint8Array that matched expected image MIME-type.","keywords":["image","bufffer","mime-type","extension","validate","valicator","png","jpg","svg"],"homepage":"https://github.com/azu/validate-image-type","bugs":{"url":"https://github.com/azu/validate-image-type/issues"},"repository":{"type":"git","url":"git+https://github.com/azu/validate-image-type.git"},"license":"MIT","author":{"name":"azu"},"main":"lib/validate-image-type.js","types":"lib/validate-image-type.d.ts","directories":{"lib":"lib","test":"test"},"scripts":{"build":"cross-env NODE_ENV=production tsc -p .","clean":"rimraf lib/","prettier":"prettier --write \"**/*.{js,jsx,ts,tsx,css}\"","prepublish":"npm run --if-present build","test":"mocha \"test/**/*.ts\"","watch":"tsc -p . --watch"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{js,jsx,ts,tsx,css}":["prettier --write","git add"]},"prettier":{"printWidth":120,"singleQuote":false,"tabWidth":4},"dependencies":{"image-type":"^4.1.0","is-svg":"^4.2.1","read-chunk":"^3.2.0"},"devDependencies":{"@types/mocha":"^7.0.2","@types/node":"^14.0.5","cross-env":"^7.0.2","husky":"^4.2.5","lint-staged":"^10.2.4","mocha":"^7.1.2","prettier":"^2.0.5","rimraf":"^3.0.2","ts-node":"^8.10.1","ts-node-test-register":"^8.0.1","typescript":"^3.9.3"},"gitHead":"4de35f89e1a000f55dbeace73b890d4d7fe278e4","_id":"validate-image-type@1.1.0","_nodeVersion":"14.5.0","_npmVersion":"6.14.5","_npmUser":{"name":"azu","email":"azuciao@gmail.com"},"dist":{"integrity":"sha512-5opIyNIdhMCKBo+XHBogHKI2QP83rSoMt3KcfvVeGjx57MieNAcD5CE/SOWyzWGrxtsWqID6axKj8cWuHAUALw==","shasum":"ff42ba238b61e1d17d63abdf610d065130b24929","tarball":"https://registry.npmjs.org/validate-image-type/-/validate-image-type-1.1.0.tgz","fileCount":7,"unpackedSize":13895,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYdITCRA9TVsSAnZWagAAEiQP/iQqxcoDYKvX+1GbnJL5\nA30iO8cLiR8CGBco0vRKR2LnLX47RwoQ9yaEdS0YDJcbM4cxXGeDOew5Biyj\nHb1pDfdi1jYdZoRDBfxUUm27ki7SqYvtTN9dugZud+bM3uH+SZZp+Cdgjaj5\nTYQUK7pViHwlrfBpN81ei4Q9D2z8bJNU93iF167u2m+WoxtGry8qYQ4WBqFO\n6OrG0G2kbPxuJPeFtKP1UJAVEf0LirFfP4ZWiC+KROJQMJIHM0Az0hxLAmqT\np813dQwZK5b4AYKPK+TsLpmJlSNdv0uGFFRoVg5hQW5on3egpkBMZVvLD27A\nXf9Kox51GO6fdXEGbg8b0/3oXdSOG6Z7OghJ4f9TolOQUk8Uysura2iysjJV\nSPJmjtsKCF9FG5kQuvl8X9EKdEwiM+97usGtSIm5kcqwI/oR/qOywPP/s20H\na6MspRb3xxAhZOCVRj4NVR2oAcHKsuaXzJ3SRUo7H16TvwjmOF4lXnHjojXm\nDcijHQbhAw2NZUgGxT2RWOFXB2I6oZKhdFmuvJC8sOrA6UMNuGGZsRChgYGq\nPHUHYQAxYrxTOevNzyrEhEqTrgVDlsKb5Z+/NctUgJ5Y90xVz00hKW2FtRK9\nwrlU0rMblFdZriQdn+UCdiKTPUkZQdli2Z5CqlVTuXz69iYWMQO6T7zznG/a\nKNHk\r\n=CXJa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEhRBahtZaLORDL2eT/VJKqPWxA1P5jYbRhOoAu6RHZHAiEA49PKUKSWZQL4r9IYnkRh5P4ZUme2c+z2xYoVUEUem4Y="}]},"maintainers":[{"name":"azu","email":"azuciao@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/validate-image-type_1.1.0_1600246290964_0.04837835705802851"},"_hasShrinkwrap":false},"1.1.1":{"name":"validate-image-type","version":"1.1.1","description":"Check the image file of a Buffer/Uint8Array that matched expected image MIME-type.","keywords":["image","bufffer","mime-type","extension","validate","valicator","png","jpg","svg"],"homepage":"https://github.com/azu/validate-image-type","bugs":{"url":"https://github.com/azu/validate-image-type/issues"},"repository":{"type":"git","url":"git+https://github.com/azu/validate-image-type.git"},"license":"MIT","author":{"name":"azu"},"main":"lib/validate-image-type.js","types":"lib/validate-image-type.d.ts","directories":{"lib":"lib","test":"test"},"scripts":{"build":"cross-env NODE_ENV=production tsc -p .","clean":"rimraf lib/","prettier":"prettier --write \"**/*.{js,jsx,ts,tsx,css}\"","prepublish":"npm run --if-present build","test":"mocha \"test/**/*.ts\"","watch":"tsc -p . --watch"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{js,jsx,ts,tsx,css}":["prettier --write","git add"]},"prettier":{"printWidth":120,"singleQuote":false,"tabWidth":4},"dependencies":{"image-type":"^4.1.0","is-svg":"^4.2.1","read-chunk":"^3.2.0"},"devDependencies":{"@types/mocha":"^7.0.2","@types/node":"^14.0.5","cross-env":"^7.0.2","husky":"^4.2.5","lint-staged":"^10.2.4","mocha":"^7.1.2","prettier":"^2.0.5","rimraf":"^3.0.2","ts-node":"^8.10.1","ts-node-test-register":"^8.0.1","typescript":"^3.9.3"},"gitHead":"06c54f2ea448c7366d6fa2bc3a1542c2f88a5711","_id":"validate-image-type@1.1.1","_nodeVersion":"14.5.0","_npmVersion":"6.14.5","_npmUser":{"name":"azu","email":"azuciao@gmail.com"},"dist":{"integrity":"sha512-HHdBX4fzY8IfVOMFLEyRNSevj6fyPrZjnCiyzBnB8KH1YUDlUL9CLyEu8MpX2DMrAEjkOm9ogygkx0WLZT4JBw==","shasum":"2ca697e39bd2c3259ca9e81c066631c7f948a720","tarball":"https://registry.npmjs.org/validate-image-type/-/validate-image-type-1.1.1.tgz","fileCount":7,"unpackedSize":17043,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfdntMCRA9TVsSAnZWagAA2/sP/3DXLnqamJAc9IcOQ6RT\nRmRh065rNohoKh2O4WVPKhHaX8Lz51rrhmjVVKckCHPBsrIXVGNfeYEBEQNk\nqAoai2392fcTh94rg09g/O7QMJvNiTcdXvYD7/H90oLCkLqjFrkBGBlrqnR+\n8AqcY0eW3l/UCAGuZ0HDasyoFZ5Q7CHfojc3Cs0X3hgrlJ/ssBPQw56oUx4r\nJMikr8TqOV1Bx/XUOs/FqeGzVXmiGXs6LBoU62dx3+UbcyOWC8IX8M/fjsgZ\nUw8hbwLSdxBcNLCfTvx4AWzcoIwIrDIwM5KlAxkZIzRm4LpxvJRK0i0gUoLf\nYy5eQKjJl34n72/LfspNp/62Ay403Abb2cfauSlqIPXKrFUIinMwvhIqRBVh\ntPZhKkXakwso00+nwKYmopm2GZXdMTuCDNay7oOvv5FJ1CcSQ01k+lxKvo6E\ncuF3uwRyvqudelaVN8AZYuOb/Muieun7fHA0RqV8RRDy3t8GcGpQF23XUDe8\n2tdD8lTqLtYm8hw6sIajb2YHBi2K03it6VxaCYfhOqUxE4o0zctemkjlE24H\nGK/JVDLiDB6NUJRZ3j32XIhPuhAjCGKfGpP8ITmhoprQsxvMHbJiZRMe0LbN\ns9ATGDamZrKQ/5uK0V55UmLtt8oViaemY2G58ytPgrWuRBGXM2O0j8AdBBYP\nyQPM\r\n=w4V4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDij0kPGdbe//+ceswpiYR3mE5X8uQGb+NbAUwccsjwcAIgVR/llGwowRuDyyvnCbDO8qPiAnbUXP/PlZMrKZNqEn4="}]},"maintainers":[{"name":"azu","email":"azuciao@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/validate-image-type_1.1.1_1601600331698_0.5136232296779222"},"_hasShrinkwrap":false},"1.2.0":{"name":"validate-image-type","version":"1.2.0","description":"Check the image file of a Buffer/Uint8Array that matched expected image MIME-type.","keywords":["image","bufffer","mime-type","extension","validate","valicator","png","jpg","svg"],"homepage":"https://github.com/azu/validate-image-type","bugs":{"url":"https://github.com/azu/validate-image-type/issues"},"repository":{"type":"git","url":"git+https://github.com/azu/validate-image-type.git"},"license":"MIT","author":{"name":"azu"},"main":"lib/validate-image-type.js","types":"lib/validate-image-type.d.ts","directories":{"lib":"lib","test":"test"},"scripts":{"build":"cross-env NODE_ENV=production tsc -p .","clean":"rimraf lib/","prettier":"prettier --write \"**/*.{js,jsx,ts,tsx,css}\"","prepublish":"npm run --if-present build","test":"mocha \"test/**/*.ts\"","watch":"tsc -p . --watch"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{js,jsx,ts,tsx,css}":["prettier --write","git add"]},"prettier":{"printWidth":120,"singleQuote":false,"tabWidth":4},"dependencies":{"image-type":"^4.1.0","is-svg":"^4.2.1","read-chunk":"^3.2.0"},"devDependencies":{"@types/mocha":"^7.0.2","@types/node":"^14.0.5","cross-env":"^7.0.2","husky":"^4.2.5","lint-staged":"^10.2.4","mocha":"^7.1.2","prettier":"^2.0.5","rimraf":"^3.0.2","ts-node":"^8.10.1","ts-node-test-register":"^8.0.1","typescript":"^3.9.3"},"gitHead":"d7c09d533765bfc4fd8f685313c259e0ea6131a8","_id":"validate-image-type@1.2.0","_nodeVersion":"16.15.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-p5qVWR9XdO8JEpEwUu0T19B2fSxgOhIj+fOx6QJoAIPz4eucctZdxKTLLetTseIQmw62zr6kBC+AuqVzbfjt8A==","shasum":"b4c01508341eea75015f87ebe9432c737a7477f3","tarball":"https://registry.npmjs.org/validate-image-type/-/validate-image-type-1.2.0.tgz","fileCount":7,"unpackedSize":17789,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDGe5bggx0eL+iczpxE/RDy9vRWtH8PHwnG7xa1PSzScwIgJ4z9i3SpaTxRwkg/QQFQYoyea4oLtRakgBIVb6WO5dU="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJixSahACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmogwQ/+I8BIMRkiflhpVDgopu8+A3GxH14RnR6rR+SJ5PjANAwzI/cb\r\nE+g1ElYGE5xFB83H4fjYtd09INr4XXGasSMpZsOnnAsA0LUPJEQYDnV88ZnQ\r\nfZsOJA7Qhu6RnzYJHKM/BWF2rlEnCt+Ykp16kC0EmgCKQtKVscoOkeGDckeQ\r\n0asqZ+Zr8rIF5EtX8nVpoc5E5ngVl9tJZvcBIRvh6G6gM2GkVCEiwUSzOVUq\r\nEUo1ems4jDabu++VjngcKrFTE2EWXN1dHfy7wsIqITzD5QI79AQj/xVdvXLL\r\nqHoy9dH/XPYZeFbYZC+NSkNUvBLGmHB6VWFZg96hRvVWW+STNy/hRQn0px87\r\ngamamo4H2qAkd8WI/0rLG/Hq9wWHr8ZQYtyV3vjkRD23x/dp9H/o+Tidka81\r\n0g5p4eRaNNkpPJpZEPVwzbJA7uqIsnHuOc00izjwR+rXVP100FSCEhbcwzui\r\nad7FMo4tPg1Rs9ODBFqwx73Irl7ndQmx6T52jcKTAI3x71oVMbiGiOH5ohz0\r\nbg7QA25Fm35RECBWwT0xuF51+SWEdQhRLlUjuZKSvAzsbJUNqBQrZ3+ZFhEP\r\ntNGl14BW6H09XjqPVPuLDUL4mo4enaFwkqRA21yyMpnzbUdSX93RDopfTeKi\r\nygIGpGJpI14vdlPeZbkI2GiyPH5GWCeELAc=\r\n=vzxB\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"azu","email":"azuciao@gmail.com"},"maintainers":[{"name":"azu","email":"azuciao@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/validate-image-type_1.2.0_1657087649649_0.7891936537619517"},"_hasShrinkwrap":false},"2.0.0":{"name":"validate-image-type","version":"2.0.0","description":"Check the image file of a Buffer/Uint8Array that matched expected image MIME-type.","keywords":["image","bufffer","mime-type","extension","validate","valicator","png","jpg","svg"],"homepage":"https://github.com/azu/validate-image-type","bugs":{"url":"https://github.com/azu/validate-image-type/issues"},"repository":{"type":"git","url":"https://github.com/azu/validate-image-type.git"},"license":"MIT","author":{"name":"azu"},"main":"lib/validate-image-type.js","types":"lib/validate-image-type.d.ts","scripts":{"build":"tsc -p .","clean":"rimraf lib/","prepublish":"npm run --if-present build","test":"mocha \"test/**/*.ts\"","watch":"tsc -p . --watch","format":"prettier --write \"**/*.{js,jsx,ts,tsx,css}\"","prepare":"git config --local core.hooksPath .githooks"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{js,jsx,ts,tsx,css}":["prettier --write"]},"prettier":{"singleQuote":false,"printWidth":120,"tabWidth":4,"trailingComma":"none"},"dependencies":{"file-type":"^16.5.4","is-svg":"^4.2.1","read-chunk":"^3.2.0"},"devDependencies":{"@types/mocha":"^9.1.1","@types/node":"^18.0.6","lint-staged":"^13.0.3","mocha":"^10.0.0","prettier":"^2.7.1","rimraf":"^3.0.2","ts-node":"^10.9.1","ts-node-test-register":"^10.0.0","typescript":"^4.7.4"},"licenseText":"Copyright (c) 2020 azu\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"validate-image-type@2.0.0","dist":{"shasum":"4e900bf9323323a8420f326efd07a1667fc0a2fa","integrity":"sha512-9fynu3Ok2My8D/vBsFXU0xXVuhQhCoE4YBQ1FiWgQAzJ8rWPCkXCqgt9TLOlPY2AFQ2PqAqVBIBfFyS88nFaww==","tarball":"https://registry.npmjs.org/validate-image-type/-/validate-image-type-2.0.0.tgz","fileCount":18,"unpackedSize":22624,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDi1OLgIsaH4ssaoIHVngX8rVulrmRP0N5pL75BRAp/qgIgA+pBZ+4mdPg98psAZ2z6y3z0nbGFO8eGVLzUyMzk7+w="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi21LEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrBCQ/+JPfTT0KhS1GLTmthhb6szrrsGXDMfNQWk60BpBKuEqf6TTDV\r\n1oUvh+TKMpgUxHOY1QcqCAPJ6C5R2Hjf1iABtt/eXNz34SX5127LWXOBSQez\r\nNPm+Y8ssbetyYVIDhJZi4MO4wdgRrr/HgSgYIobI8mkAeP0p/hBohwW57brT\r\nsdD1KNE3nES14WkxJuwY524d3DFebwKMDbzRXnH1OfvA+1CYczqLT4pz9DPg\r\n5Kp1DcNkpZuf7er/Po7sUmJ40jYqSteI83sB5m2dvCGkxxi5cB7kfLGKOTo2\r\nMEXjJs1XTWFo4yP0RC1DOKhL+28kJPYRRw9e0pw59Ch6DkRJ2otGSFhtPehn\r\nDbPKz44/VvW6QTAQDeePJBYgdmXFbdn9G+t6+irxtLjDhbU0ntFj7XZng+2y\r\nKzfwBwgaJAwEUcWGbHkYrDo8Wy9N+WHMwUn400GeM2xMwMo8ljs+QUR7MNfL\r\nIbbyqNY56wMXT85wBKc4HhjypgOAlVoJOqS0LwDHvSYL/yqUD2glNJXBo3kV\r\nzZF2xx+oMyQ09A1RSRgjtOiDHxq8Ylk7oOIgki00dXDBJuW9vYL7058Vx+ZW\r\npcHIA+UVIwg7vE+IGwtUDWajlRli1m3qYYlb4pO2ImsyhNQkqrir3bH8I9XX\r\nuupsWhzdxaXHTYZCVcQZkNwsKMOsVMg8ikM=\r\n=w9Ra\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"azu","email":"azuciao@gmail.com"},"directories":{},"maintainers":[{"name":"azu","email":"azuciao@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/validate-image-type_2.0.0_1658540740766_0.5683959925838606"},"_hasShrinkwrap":false},"3.0.0":{"name":"validate-image-type","version":"3.0.0","description":"Check the image file of a Buffer/Uint8Array that matched expected image MIME-type.","keywords":["image","bufffer","mime-type","extension","validate","valicator","png","jpg","svg"],"homepage":"https://github.com/azu/validate-image-type","bugs":{"url":"https://github.com/azu/validate-image-type/issues"},"repository":{"type":"git","url":"git+https://github.com/azu/validate-image-type.git"},"license":"MIT","author":{"name":"azu"},"main":"lib/validate-image-type.js","types":"lib/validate-image-type.d.ts","directories":{"lib":"lib","test":"test"},"scripts":{"build":"tsc -p .","clean":"rimraf lib/","prepublish":"npm run --if-present build","test":"mocha \"test/**/*.ts\"","watch":"tsc -p . --watch","format":"prettier --write \"**/*.{js,jsx,ts,tsx,css}\"","prepare":"git config --local core.hooksPath .githooks"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{js,jsx,ts,tsx,css}":["prettier --write"]},"prettier":{"singleQuote":false,"printWidth":120,"tabWidth":4,"trailingComma":"none"},"dependencies":{"file-type":"^18.5.0","is-svg":"^5.0.0","read-chunk":"^4.0.3"},"devDependencies":{"@types/mocha":"^10.0.3","@types/node":"^20.8.7","lint-staged":"^15.0.2","mocha":"^10.2.0","prettier":"^3.0.3","rimraf":"^5.0.5","ts-node":"^10.9.1","ts-node-test-register":"^10.0.0","typescript":"^5.2.2"},"gitHead":"53b532235e84c4ddebe04803018f673fd57425c9","_id":"validate-image-type@3.0.0","_nodeVersion":"18.16.0","_npmVersion":"9.2.0","dist":{"integrity":"sha512-40h38sGBJJyCKbaRKFpWX1u3+n1NG7iY0pOtOTlwARCogrnUALz08r7eL/B2t0AImCf76o8thcCuCmfpWbjNsQ==","shasum":"e140000b0220e1825852de36905c383f1227dbdf","tarball":"https://registry.npmjs.org/validate-image-type/-/validate-image-type-3.0.0.tgz","fileCount":15,"unpackedSize":21912,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBksGVl42byYEnf5eQiX/iZDpR5bARdPyeA1y5BqL/uuAiBVprfYnBNxv72zd5vQVpPCAPNum/PzSkJl1VkGdE04wg=="}]},"_npmUser":{"name":"azu","email":"azuciao@gmail.com"},"maintainers":[{"name":"azu","email":"azuciao@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/validate-image-type_3.0.0_1697974550803_0.7826831697978223"},"_hasShrinkwrap":false}},"time":{"created":"2020-05-22T02:10:52.424Z","1.0.1":"2020-05-22T02:10:52.607Z","modified":"2023-10-22T11:35:51.191Z","1.1.0":"2020-09-16T08:51:31.168Z","1.1.1":"2020-10-02T00:58:51.808Z","1.2.0":"2022-07-06T06:07:29.872Z","2.0.0":"2022-07-23T01:45:40.946Z","3.0.0":"2023-10-22T11:35:51.023Z"},"maintainers":[{"name":"azu","email":"azuciao@gmail.com"}],"description":"Check the image file of a Buffer/Uint8Array that matched expected image MIME-type.","homepage":"https://github.com/azu/validate-image-type","keywords":["image","bufffer","mime-type","extension","validate","valicator","png","jpg","svg"],"repository":{"type":"git","url":"git+https://github.com/azu/validate-image-type.git"},"author":{"name":"azu"},"bugs":{"url":"https://github.com/azu/validate-image-type/issues"},"license":"MIT","readme":"# validate-image-type [![Actions Status](https://github.com/azu/validate-image-type/workflows/test/badge.svg)](https://github.com/azu/validate-image-type/actions?query=workflow%3A\"test\")\n\nCheck the image file of a Buffer/Uint8Array that matched expected image MIME-type.\n\nThis library check the **file contents** instead of **file extensions** using following:\n\n- [sindresorhus/file-type: Detect the file type of a Buffer/Uint8Array/ArrayBuffer](https://github.com/sindresorhus/file-type)\n- [sindresorhus/is-svg: Check if a string or buffer is SVG](https://github.com/sindresorhus/is-svg)\n\n## Features\n\n- Support various image types: [popular images types](https://github.com/sindresorhus/image-type#supported-file-types) + SVG\n- Reject File Camouflage by checking actual content buffer\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n    npm install validate-image-type\n\n## Usage\n\n```ts\nimport { validateMIMEType } from \"validate-image-type\";\nconst result = await validateMIMEType(\"./image.png\", {\n    allowMimeTypes: ['image/jpeg', 'image/gif', 'image/png', 'image/svg+xml']\n});\nif (!result.ok) {\n    console.error(result.error);\n    return;\n}\nconsole.log(\"This image is supported!\");\n```\n\nSee following document about MimeType.\n\n- https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/MIME_types\n\n## Supported file types \n\nBasic images file types and SVG(`image/svg+xml`).\n\n    \"jpg\",\n    \"png\",\n    \"gif\",\n    \"webp\",\n    \"flif\",\n    \"cr2\",\n    \"tif\",\n    \"bmp\",\n    \"jxr\",\n    \"psd\",\n    \"ico\",\n    \"bpg\",\n    \"jp2\",\n    \"jpm\",\n    \"jpx\",\n    \"heic\",\n    \"cur\",\n    \"dcm\",\n    \"svg\"\n\n\n## Examples\n\nIntegration with [Multer](https://github.com/expressjs/multer) middleware.\n\n```js\nconst multer = require('multer');\nconst temp_local_img_dir = path.join(__dirname, `/.temp_local_img_dir`);\nconst upload = multer({ dest: temp_local_img_dir });\nconst asyncWrapper = fn => {\n    return (req, res, next) => {\n        return fn(req, res, next).catch(next);\n    }\n};\n\napp.post(\n  '/upload',\n  upload.single('image'), \n  asyncWrapper(async (req, res, next) => {\n    const validationResult = await validateMIMEType(req.file.path, {\n      originalFilename: req.file.originalname,\n      allowMimeTypes: ['image/jpeg', 'image/gif', 'image/png', 'image/svg+xml'],\n    });\n    console.log('validationResult', validationResult);\n    if (!validationResult.ok) {\n      return res.send(400);\n    }\n    // uploading task\n    // ...\n  })\n);\n```\n\n## Changelog\n\nSee [Releases page](https://github.com/azu/validate-image-type/releases).\n\n## Running tests\n\nInstall devDependencies and Run `npm test`:\n\n    npm test\n\n## Contributing\n\nPull requests and stars are always welcome.\n\nFor bugs and feature requests, [please create an issue](https://github.com/azu/validate-image-type/issues).\n\n1. Fork it!\n2. Create your feature branch: `git checkout -b my-new-feature`\n3. Commit your changes: `git commit -am 'Add some feature'`\n4. Push to the branch: `git push origin my-new-feature`\n5. Submit a pull request :D\n\n## Author\n\n- [github/azu](https://github.com/azu)\n- [twitter/azu_re](https://twitter.com/azu_re)\n\n## License\n\nMIT © azu\n","readmeFilename":"README.md"}