{"name":"is-psd","version":"1.0.0","description":"Check if a Buffer/Uint8Array is a PSD image","license":"MIT","repository":{"type":"git","url":"https://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"},"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":"cf1bf134189659985010da7393a124ec1a12661a","bugs":{"url":"https://github.com/sindresorhus/is-psd/issues"},"homepage":"https://github.com/sindresorhus/is-psd","_id":"is-psd@1.0.0","_shasum":"43795089107701c8b816102bef0cf9cc98e3b5de","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"dist":{"shasum":"43795089107701c8b816102bef0cf9cc98e3b5de","tarball":"http://registry-npm.ywwl.com/is-psd/download/is-psd-1.0.0.tgz","integrity":"sha512-0RxdLlCmtPl8hUyRKVAHfDuyZjmr9gsQqW6iezlJFnd3CaWKlC6qtrP9G8mXzLyGr1ngJ8l5qLLR0meV91viUQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBM+iMWrhKMPOsLlDNfTTMECPXLjC1U0HJ57hWn0NaQTAiAwLIeG0Iq/7k+7ly5XK1Ppr8Z3w/RoqVtczEO+QR2PJA=="}],"size":1090,"noattachment":false,"key":"/is-psd/-/is-psd-1.0.0.tgz"},"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":1408026961460,"_cnpm_publish_time":1408026961460,"dist-tags":{"latest":"2.0.0"}}