{"_id":"is-psd","_rev":"519247","name":"is-psd","description":"Check if a Buffer/Uint8Array is a PSD image","dist-tags":{"latest":"2.0.0"},"maintainers":[{"name":"sindresorhus","email":""}],"time":{"modified":"2021-08-10T10:35:45.000Z","created":"2014-04-21T17:43:57.877Z","2.0.0":"2021-08-10T10:31:38.391Z","1.0.1":"2018-03-22T16:00:48.305Z","1.0.0":"2014-08-14T14:36:01.460Z","0.1.1":"2014-04-29T19:13:12.691Z","0.1.0":"2014-04-21T17:43:57.877Z"},"users":{"rocket0191":true},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-psd.git"},"versions":{"2.0.0":{"name":"is-psd","version":"2.0.0","description":"Check if a Buffer/Uint8Array is a PSD image","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/is-psd.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.20.0 || ^14.13.1 || >=16.0.0"},"scripts":{"test":"xo && ava"},"keywords":["psd","photoshop","document","graphics","image","img","picture","photo","type","detect","check","is","exif","binary","buffer","uint8array"],"devDependencies":{"ava":"^3.15.0","read-chunk":"^4.0.0","xo":"^0.44.0"},"gitHead":"9c657545035ba301e285b00ddd33017dc2c93bdd","bugs":{"url":"https://github.com/sindresorhus/is-psd/issues"},"homepage":"https://github.com/sindresorhus/is-psd#readme","_id":"is-psd@2.0.0","_nodeVersion":"16.2.0","_npmVersion":"7.13.0","dist":{"shasum":"03ce3fbd18dfe7dae8a9e2a9b5b25b8fb0d5dc5b","size":1713,"noattachment":false,"key":"/is-psd/-/is-psd-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-psd/download/is-psd-2.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-psd_2.0.0_1628591498281_0.7662066349561514"},"_hasShrinkwrap":false,"publish_time":1628591498391,"_cnpm_publish_time":1628591498391},"1.0.1":{"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":{"shasum":"b021d9e2ed2e31deda497c95ba94745e2c46e2b8","size":1756,"noattachment":false,"key":"/is-psd/-/is-psd-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-psd/download/is-psd-1.0.1.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/is-psd_1.0.1_1521734448260_0.5371755390622752"},"_hasShrinkwrap":false,"publish_time":1521734448305,"_cnpm_publish_time":1521734448305},"1.0.0":{"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":""}],"dist":{"shasum":"43795089107701c8b816102bef0cf9cc98e3b5de","size":1090,"noattachment":false,"key":"/is-psd/-/is-psd-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-psd/download/is-psd-1.0.0.tgz"},"directories":{},"publish_time":1408026961460,"_cnpm_publish_time":1408026961460,"_hasShrinkwrap":false},"0.1.1":{"name":"is-psd","version":"0.1.1","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.1","dist":{"shasum":"65f2b0a1aef3e794e914746f6969632397ba2e33","size":1153,"noattachment":false,"key":"/is-psd/-/is-psd-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-psd/download/is-psd-0.1.1.tgz"},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1398798792691,"_cnpm_publish_time":1398798792691,"_hasShrinkwrap":false},"0.1.0":{"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","size":1149,"noattachment":false,"key":"/is-psd/-/is-psd-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/is-psd/download/is-psd-0.1.0.tgz"},"_from":".","_npmVersion":"1.4.6","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1398102237877,"_cnpm_publish_time":1398102237877,"_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","_attachments":{},"homepage":"https://github.com/sindresorhus/is-psd#readme","bugs":{"url":"https://github.com/sindresorhus/is-psd/issues"},"license":"MIT"}