{"name":"is-psd","version":"0.1.0","description":"Check if a Buffer/Uint8Array is a PSD image","license":"MIT","repository":{"type":"git","url":"git://github.com/sindresorhus/is-psd"},"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":["psd","photoshop","document","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-psd/issues"},"homepage":"https://github.com/sindresorhus/is-psd","_id":"is-psd@0.1.0","dist":{"shasum":"da5f93f6403905f3412d84c416ad7f940cbaa176","tarball":"http://registry-npm.ywwl.com/is-psd/download/is-psd-0.1.0.tgz","integrity":"sha512-K6gV/XONAWJh3jEMw3YNJLHoNu8wx8Vto1pXrcTsNH2QEQ2aHfFImDi9V29GSFg9Jl7wK9lcYY56s5k2pPpVCw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDV7MlZ4oyd57JKNaz+powZcsIb6nBbU+vQSGcskhEM2wIhAO+nZdvVKpvbCeWD//01EMt1s9WFmJxMg3RKdc5sDrQ9"}],"size":1149,"noattachment":false,"key":"/is-psd/-/is-psd-0.1.0.tgz"},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"readme":"# is-psd\n\n> Check if a Buffer/Uint8Array is a [PSD](https://en.wikipedia.org/wiki/Adobe_Photoshop#File_format) image\n\n## Install\n\n```\n$ npm install is-psd\n```\n\n## Usage\n\n##### Node.js\n\n```js\nimport {readChunkSync} from 'read-chunk';\nimport isPsd from 'is-psd';\n\nconst buffer = readChunkSync('unicorn.psd', {length: 4});\n\nisPsd(buffer);\n//=> true\n```\n\n##### Browser\n\n```js\nconst xhr = new XMLHttpRequest();\nxhr.open('GET', 'unicorn.psd');\nxhr.responseType = 'arraybuffer';\n\nxhr.onload = () => {\n\tisPsd(new Uint8Array(this.response));\n\t//=> true\n};\n\nxhr.send();\n```\n\n## API\n\n### isPsd(buffer)\n\nAccepts a `Buffer` (Node.js) or `Uint8Array`.\n\nIt only needs the first 4 bytes.\n\n## Related\n\n- [file-type](https://github.com/sindresorhus/file-type) - Detect the file type of a Buffer/Uint8Array\n","publish_time":1398102237877,"_cnpm_publish_time":1398102237877,"dist-tags":{"latest":"2.0.0"}}