{"name":"is-psd","version":"1.0.1","description":"Check if a Buffer/Uint8Array is a PSD image","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-psd.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":["psd","photoshop","document","graphics","image","img","pic","picture","photo","type","detect","check","is","exif","binary","buffer","uint8array"],"devDependencies":{"mocha":"*","read-chunk":"^1.0.0"},"gitHead":"64f00c9d2e856dc895f039714ca885ba5dcd7ca4","bugs":{"url":"https://github.com/sindresorhus/is-psd/issues"},"homepage":"https://github.com/sindresorhus/is-psd#readme","_id":"is-psd@1.0.1","_npmVersion":"5.6.0","_nodeVersion":"8.10.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-xypq6EZdJepbBhEY9of8FkWUBgSVWqktLlkzSROkAPmTN+aHL4hqnS/pnLpHjTnRDSTYPeIb49CmCKaHL8NG0A==","shasum":"b021d9e2ed2e31deda497c95ba94745e2c46e2b8","tarball":"http://registry-npm.ywwl.com/is-psd/download/is-psd-1.0.1.tgz","fileCount":4,"unpackedSize":2983,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDsSZXRUd6jPBS60UO8RZVJauxtaDh6B33hRPjbiRFOdAIhANHQt9Rq8cxK0NAavNF9uTedw5SEgt2EMd6yV7R0ntMA"}],"size":1756,"noattachment":false,"key":"/is-psd/-/is-psd-1.0.1.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-psd_1.0.1_1521734448260_0.5371755390622752"},"_hasShrinkwrap":false,"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":1521734448305,"_cnpm_publish_time":1521734448305,"dist-tags":{"latest":"2.0.0"}}