{"_id":"is-png","_rev":"15-9fb7988d837dfbd01f49bc1935d86278","name":"is-png","description":"Check if a Buffer/Uint8Array is a PNG image","dist-tags":{"latest":"3.0.1"},"versions":{"0.1.0":{"name":"is-png","version":"0.1.0","description":"Check if a Buffer/Uint8Array is a PNG image","license":"MIT","repository":{"type":"git","url":"git://github.com/sindresorhus/is-png"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha","browser":"browserify -s $npm_package_name -o browser.js ."},"files":["index.js"],"keywords":["png","portable","network","graphics","image","img","pic","picture","photo","type","detect","check","is","exif","binary","buffer","uint8array"],"devDependencies":{"browserify":"^3.0.0","mocha":"*","read-chunk":"^0.1.0"},"bugs":{"url":"https://github.com/sindresorhus/is-png/issues"},"homepage":"https://github.com/sindresorhus/is-png","_id":"is-png@0.1.0","dist":{"shasum":"037e4f79892b3d393911ccb8502a9a20c8743ad9","tarball":"https://registry.npmjs.org/is-png/-/is-png-0.1.0.tgz","integrity":"sha512-gQ96sOYZoYh84A2Il/gYhMToM+jRfzzDP6h4jJ6vq1XsVRCE2DMUCQfbYxF5wy0W4n5nkp1PyQ4X44yUxnuHzw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCZO2xIqSaTUfmVe19/t9VORVXfh/H2X5HGuT4gHdNVqwIhANOubuHIKBzsgkGPvSw4Mr6OVlUUzASyp6Mtokcrn6dp"}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{}},"0.1.1":{"name":"is-png","version":"0.1.1","description":"Check if a Buffer/Uint8Array is a PNG image","license":"MIT","repository":{"type":"git","url":"git://github.com/sindresorhus/is-png"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha","browser":"browserify -s $npm_package_name -o browser.js ."},"files":["index.js"],"keywords":["png","portable","network","graphics","image","img","pic","picture","photo","type","detect","check","is","exif","binary","buffer","uint8array"],"devDependencies":{"browserify":"^3.0.0","mocha":"*","read-chunk":"^0.1.0"},"bugs":{"url":"https://github.com/sindresorhus/is-png/issues"},"homepage":"https://github.com/sindresorhus/is-png","_id":"is-png@0.1.1","dist":{"shasum":"6a5a548497365a02d321f441be820d1e08e616d3","tarball":"https://registry.npmjs.org/is-png/-/is-png-0.1.1.tgz","integrity":"sha512-vJI594CgNUMGPyQzTGs+LKOUDjzYGBDclyGUnHCLtMdYRyzcEBIZ4jfa1tL33RQAPPty2/HSroXMsTVocT13dA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEQ0H1HzX9V9myh4zFANBCzHSwDa3zxxgvYjBlo1FALHAiAiOSupxKSmE9x2NIfUO4EcsK1ac9s/FTRu/jGayYzt2Q=="}]},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{}},"1.0.0":{"name":"is-png","version":"1.0.0","description":"Check if a Buffer/Uint8Array is a PNG image","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/is-png"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"files":["index.js"],"keywords":["png","portable","network","graphics","image","img","pic","picture","photo","type","detect","check","is","exif","binary","buffer","uint8array"],"devDependencies":{"mocha":"*","read-chunk":"^1.0.0"},"gitHead":"69f6bb58baae7c8c60c145b8e68bb57d51d1ceca","bugs":{"url":"https://github.com/sindresorhus/is-png/issues"},"homepage":"https://github.com/sindresorhus/is-png","_id":"is-png@1.0.0","_shasum":"3d80373fe9b89d65fd341f659d3fc0a1135e718a","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"dist":{"shasum":"3d80373fe9b89d65fd341f659d3fc0a1135e718a","tarball":"https://registry.npmjs.org/is-png/-/is-png-1.0.0.tgz","integrity":"sha512-OrrKxCoANWfOZebYnJohnvYeahISSr077GYzaeyFXyFCoiQIbRB9uDyKM7ewflOL/LQsAS6s2WpFUsYMH2oANA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCJulkOIkccNDAnkkhOhYseqNv5gsuoAOI+epHGpRc9+AIgJkJLTzdNp756NELZlbpp3Il4F60J82ozcgDptMlvDiA="}]},"directories":{}},"1.1.0":{"name":"is-png","version":"1.1.0","description":"Check if a Buffer/Uint8Array is a PNG image","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-png.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"files":["index.js"],"keywords":["png","portable","network","graphics","image","img","pic","picture","photo","type","detect","check","is","exif","binary","buffer","uint8array"],"devDependencies":{"mocha":"*","read-chunk":"^1.0.0"},"gitHead":"f84fe7fa3c92a56be521aef6d3e621ca8e5a7993","bugs":{"url":"https://github.com/sindresorhus/is-png/issues"},"homepage":"https://github.com/sindresorhus/is-png#readme","_id":"is-png@1.1.0","_shasum":"d574b12bf275c0350455570b0e5b57ab062077ce","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.7.3","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"d574b12bf275c0350455570b0e5b57ab062077ce","tarball":"https://registry.npmjs.org/is-png/-/is-png-1.1.0.tgz","integrity":"sha512-23Rmps8UEx3Bzqr0JqAtQo0tYP6sDfIfMt1rL9rzlla/zbteftI9LSJoqsIoGgL06sJboDGdVns4RTakAW/WTw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDET5DGGVlbgLGAwNIyu9vkrAM8i1Y0QUmHkf7C5URpPgIhALt5VFZEy0f1APohH3RU6/q2P18LAVcUXFiKY/zg+75Q"}]},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/is-png-1.1.0.tgz_1492359784040_0.0196734513156116"},"directories":{}},"2.0.0":{"name":"is-png","version":"2.0.0","description":"Check if a Buffer/Uint8Array is a PNG image","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-png.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava && tsd"},"keywords":["png","portable","network","graphics","image","picture","photo","type","detect","check","is","exif","binary","buffer","uint8array"],"devDependencies":{"@types/node":"^11.13.5","ava":"^1.4.1","read-chunk":"^3.2.0","tsd":"^0.7.2","xo":"^0.24.0"},"gitHead":"57a50f7ccebf322f3beaf70985fbbca33decf76f","bugs":{"url":"https://github.com/sindresorhus/is-png/issues"},"homepage":"https://github.com/sindresorhus/is-png#readme","_id":"is-png@2.0.0","_nodeVersion":"8.16.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-4KPGizaVGj2LK7xwJIz8o5B2ubu1D/vcQsgOGFEDlpcvgZHto4gBnyd0ig7Ws+67ixmwKoNmu0hYnpo6AaKb5g==","shasum":"ee8cbc9e9b050425cedeeb4a6fb74a649b0a4a8d","tarball":"https://registry.npmjs.org/is-png/-/is-png-2.0.0.tgz","fileCount":5,"unpackedSize":3905,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcutM9CRA9TVsSAnZWagAAvGYP/RQ08MiR+V8fAfIgqyXB\nOzIznXovs8O3GJKpLGIXITzdgWnU4CzN0r+TgdqOOisDCs01hAtXKwXRVn1A\nw77lMFKlhGwc+P98RVxW6o4lHjYgA5IGrp2f6lhp0WPK1j6ePhhJszqnJOCG\nlV3a9UogPE8Bi0ZzMHXr2EfIKcxLmJa+MN8w/t4RrrpUb7bVUX6Li3LXGw76\nPnGBKEFSk7xcl+fF3uoHfEaTnyZLlJmPtPk0t0wsWBN69y3qbAaFQxeuixv1\nysF0fEQ1b5Y3vFh/gc0XJMf6A7PD8j2KD1NePlHAlut8wRnjV8zDSEHYdXhX\ns6IOgZS4k6R9sWhP1Cm6i1RrfcmabJe4d0DyXT1T9ZvVhuD+/WPstBKOtE1A\nBxIq/lqzfSYC+orHNdQXjSHHgFubtwBqH7k5vvupnsmgZy16a5XJdM5uN48H\n+RPlHt/NFxBMSK0m+CJNay5HQPhbDrKBhL2PeXOtsjnEo8Yu4Sw1sJ0wqCqC\nxKqi9LuPOOydiSkR9K7vJf8HjDBT+t7ntsmuAtoK8nvhgic6EEMRe7Sj5Y1j\nDDetiLtwXtHrT7lj2dP8T9vThZ2b50a/MycpDX0zqBEZBGVwkuN9NHtFAq9y\nLo/leMFEbxBd7KaxRRut2W7iEDAYgT2PJ4AfNdWquvUiX8CzaxUi9I+MHd4w\nMVCf\r\n=LQq8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD1+ALQoYQSNrhKFsZ8O21CGLB3/Fpk8sXVVRAtfsgP9wIhAOHSMYD99FD6PTUJSzwcfKq/817dOmpu33JwaAD/pq0m"}]},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-png_2.0.0_1555747644981_0.2205371052500349"},"_hasShrinkwrap":false},"3.0.0":{"name":"is-png","version":"3.0.0","description":"Check if a Buffer/Uint8Array is a PNG image","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-png.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":">=12"},"scripts":{"test":"xo && ava && tsd"},"keywords":["png","portable","network","graphics","image","picture","photo","type","detect","check","is","exif","binary","buffer","uint8array"],"devDependencies":{"@types/node":"^14.14.41","ava":"^3.15.0","read-chunk":"^3.2.0","tsd":"^0.14.0","xo":"^0.38.2"},"gitHead":"80797e7b41a16f723a860d4f96ece72c8f0f6258","bugs":{"url":"https://github.com/sindresorhus/is-png/issues"},"homepage":"https://github.com/sindresorhus/is-png#readme","_id":"is-png@3.0.0","_nodeVersion":"12.22.1","_npmVersion":"6.14.10","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-waa2qEuqgLjjYT14KOUQqAEIRRIv7ttkzPVctY/qv+IAKnzXf+JAPKQas50RgO0ECPDUG/iB1zQmwpyB9kkZtQ==","shasum":"7bf5db7f32527d10c90594a751c15f74d46c8f5e","tarball":"https://registry.npmjs.org/is-png/-/is-png-3.0.0.tgz","fileCount":5,"unpackedSize":3786,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeqTRCRA9TVsSAnZWagAA9GwQAIDNFJabToFkM0DEASMe\n7lwPvZqk13up0MFKaunbNfP8uuKPlZiK5RU1eXDik9YDz9/nHDCgZPDjRRvm\n3nnruQSLrhj7h7selIJ/F7+C+J4Lm52htirYdi5XnXAOz/zB//TqOSKXgzEt\n35i1zotzgSdx+WNgVldGuFnv3gWzXHC3FViohT8ckXVxNF9RzpMbif2iMvsv\nPuGkVOwyGGNbeC0pT6xzstay4aLKvv7Zu04YMRZHSuWJjbxYRE/E2Sg8xP76\nfnQ29jwyF7XX0VwrftbjB1dO4ovX2SZF75zG+BX2C0rJFW2SJii305x42hSR\nY4tNwHUy8k1uC7ApL4x1zsEdsDozjcw8X4gMCFt0QQUmLo293Zm1mjxH+Kk+\nF+SwyBdodQL68L3ePANmqIteoAMTINEhwPeI5r+Uev43oglRwzQahUFPJTdt\nudNmCHoV8EdzV9qn4wGj2fG4MQeWFXHiTIrl1ijz+wU8sPu3aZqg+vA0ABgp\nUYJ9fEta9ZKyMh4tkF9T+EyYqNcEelW15E+BHNQv9eA79NMM6nXkkiuZfD1/\nDzUhUyeLfUURDxcxZ2SBe6Ce2ToA4ruYF6NdZiVxDG7OdImJ+mJx35+628JP\nENwm8IgMd1nwlfpy195rQllAftJMlo2CgMBBVfd+3r/pW4Fgmp7lxfv/Dp4Y\nRDID\r\n=dYke\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHjyZMHOG5G9jA+vboWMXinCpYun40q5FXrlDkVOtql0AiEAoT5dhJIyKuE1IBcA+Bc2zolzIFGbdJJeW8XcSxyrkvU="}]},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-png_3.0.0_1618650321284_0.6764831707029697"},"_hasShrinkwrap":false},"3.0.1":{"name":"is-png","version":"3.0.1","description":"Check if a Buffer/Uint8Array is a PNG image","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-png.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":">=12"},"scripts":{"test":"xo && ava && tsd"},"keywords":["png","portable","network","graphics","image","picture","photo","type","detect","check","is","exif","binary","buffer","uint8array"],"devDependencies":{"@types/node":"^16.7.10","ava":"^3.15.0","read-chunk":"^4.0.1","tsd":"^0.17.0","xo":"^0.44.0"},"gitHead":"b410a545b1d1767a7499958289f6eb70eeb267c2","bugs":{"url":"https://github.com/sindresorhus/is-png/issues"},"homepage":"https://github.com/sindresorhus/is-png#readme","_id":"is-png@3.0.1","_nodeVersion":"14.17.5","_npmVersion":"7.20.3","dist":{"integrity":"sha512-8TqC8+bdsm3YkpI2aECCDycFDl1hTB0HMVRnP3xRRa3Tqx2oVE7sBi1G6CuO9IqEyWSzbBZr1mGqdb3it9h/pg==","shasum":"423643ad42bf9420a8ccfb4c1dc6c15fac31710b","tarball":"https://registry.npmjs.org/is-png/-/is-png-3.0.1.tgz","fileCount":5,"unpackedSize":3772,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhMNtrCRA9TVsSAnZWagAAjfEP/RYIVYpQESDNrmqVd/fQ\nqCzgCMEOSCg8SBGymICGE12xTbEoKm+Gn2iaV9zL7QH+sHUgpTUDDfCVOKjA\n8ubPrEGcqzQgqrr85BVNyaJtB8ClXiPSDcrxlAxOFwDys3siSTeN1r9Ylcqr\nZunX2aF0l4pNjFsskDPF3/mcqF+0PGVNOyWqnbH6xxxMLxHi+er3n9/tBBe1\nlP5PX3p+zW2ZBpPqT30gUTv6amLkPK3liJBtwjuIne3OydZaJJEpkS3kPasq\nshQbxH5iBTfUBz9/Szmyd1niaoW03UhRNRbcKEbe9+6HbeGgBv0pw23yI+oE\nJqfClhkcqIErxfSpaR52UAPgLV+fBOljd+04SYJ1uuJLdRMO470N5OoC4aUO\nPymCVkUhgyoWqMBih49ubS29gIpiRvdmu2IGtA8PATq6aOOk6H7t/srMZQA4\nYRXmehj8sItUNKUtLy101ZZ3Gv78PeD4JBowXSEHVz/N7ZxjiDXfooUQ41K+\nACzsWxcEgTrXbyHQaL6NarB5pUbcJHaX0rLnAdEim5GZni5LXdLELlkvZGzT\nLCbw3gtClfU/S0mHzLU99RjEWDYY7XkTlc/mg2UqO6TzEq59dJ+HhB/LA3L/\nRbZEWcEEDJnIf/1Ei+dvAxlUtGBYqMqYZCJnYa34ltmEyvvk1ecQb2armiTK\n2MMi\r\n=0+6o\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDgQCgqryaYQGYB1XmShca8RXiY22quCbUoJ4zJ57q0QAIgXwWBAZl6M0tojucBajrFvH/7DjJ1oxET6FZVUYn3BoI="}]},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-png_3.0.1_1630591851126_0.8019698907580337"},"_hasShrinkwrap":false}},"readme":"# is-png\n\n> Check if a Buffer/Uint8Array is a [PNG](https://en.wikipedia.org/wiki/Portable_Network_Graphics) image\n\n## Install\n\n```\n$ npm install is-png\n```\n\n## Usage\n\n##### Node.js\n\n```js\nimport {readChunk} from 'read-chunk';\nimport isPng from 'is-png';\n\nconst buffer = await readChunk('unicorn.png', {length: 8});\n\nisPng(buffer);\n//=> true\n```\n\n##### Browser\n\n```js\nimport isPng from 'is-png';\n\nconst response = await fetch('unicorn.png');\nconst buffer = await response.arrayBuffer();\n\nisPng(new Uint8Array(buffer));\n//=> true\n```\n\n## API\n\n### isPng(buffer)\n\nAccepts a Buffer (Node.js) or Uint8Array. Returns a `boolean` of whether `buffer` is a PNG image.\n\n#### buffer\n\nThe buffer to check. It only needs the first 8 bytes.\n\n## Related\n\n- [file-type](https://github.com/sindresorhus/file-type) - Detect the file type of a Buffer/Uint8Array/ArrayBuffer\n","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"time":{"modified":"2022-06-19T02:48:12.224Z","created":"2014-04-21T17:26:13.015Z","0.1.0":"2014-04-21T17:26:13.015Z","0.1.1":"2014-04-29T19:12:35.705Z","1.0.0":"2014-08-14T14:37:02.772Z","1.1.0":"2017-04-16T16:23:05.741Z","2.0.0":"2019-04-20T08:07:25.127Z","3.0.0":"2021-04-17T09:05:21.391Z","3.0.1":"2021-09-02T14:10:51.241Z"},"homepage":"https://github.com/sindresorhus/is-png#readme","keywords":["png","portable","network","graphics","image","picture","photo","type","detect","check","is","exif","binary","buffer","uint8array"],"repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-png.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"bugs":{"url":"https://github.com/sindresorhus/is-png/issues"},"license":"MIT","readmeFilename":"readme.md","users":{"dpobel":true,"rocket0191":true}}