{"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"keywords":["png","portable","network","graphics","image","img","pic","picture","photo","type","detect","check","is","exif","binary","buffer","uint8array"],"dist-tags":{"latest":"1.1.0"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"description":"Check if a Buffer/Uint8Array is a PNG image","readme":"# is-png [![Build Status](https://travis-ci.org/sindresorhus/is-png.svg?branch=master)](https://travis-ci.org/sindresorhus/is-png)\n\n> Check if a Buffer/Uint8Array is a [PNG](http://en.wikipedia.org/wiki/Portable_Network_Graphics) image\n\nUsed by [image-type](https://github.com/sindresorhus/image-type).\n\n\n## Install\n\n```sh\n$ npm install --save is-png\n```\n\n\n## Usage\n\n##### Node.js\n\n```js\nvar readChunk = require('read-chunk'); // npm install read-chunk\nvar isPng = require('is-png');\nvar buffer = readChunk.sync('unicorn.png', 0, 8);\n\nisPng(buffer);\n//=> true\n```\n\n##### Browser\n\n```js\nvar xhr = new XMLHttpRequest();\nxhr.open('GET', 'unicorn.png');\nxhr.responseType = 'arraybuffer';\n\nxhr.onload = function () {\n\tisPng(new Uint8Array(this.response));\n\t//=> true\n};\n\nxhr.send();\n```\n\n\n## API\n\n### isPng(buffer)\n\nAccepts a Buffer (Node.js) or Uint8Array.\n\nIt only needs the first 8 bytes.\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n","repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-png.git"},"users":{"dpobel":true,"rocket0191":true},"bugs":{"url":"https://github.com/sindresorhus/is-png/issues"},"license":"MIT","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":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/is-png/-/is-png-0.1.0.tgz"},"_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":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/is-png/-/is-png-0.1.1.tgz"},"_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":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/is-png/-/is-png-1.0.0.tgz"},"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":"http://nexus.dui88.com:8081/nexus/content/groups/npm-all/is-png/-/is-png-1.1.0.tgz"},"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":{}}},"name":"is-png","time":{"modified":"2017-04-16T16:23:05.741Z","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"},"readmeFilename":"readme.md","homepage":"https://github.com/sindresorhus/is-png#readme"}