{"_id":"png-validator","_rev":"4-416994f5d0a948729ed4b6ff0bf8c976","name":"png-validator","dist-tags":{"latest":"2.0.0"},"versions":{"1.0.0":{"name":"png-validator","version":"1.0.0","description":"Png validator checks Png files for corruption","main":"dist/index.cjs.js","module":"dist/index.es.js","types":"dist/index.d.ts","author":{"name":"Sámal Rasmussen"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/samal-rasmussen/png-validator.git"},"homepage":"https://github.com/samal-rasmussen/png-validator","keywords":["png","png-validator","validator","validate","valid","corruption","corrupt","correct","checker"],"sideEffects":false,"scripts":{"build":"rollup -c && tsc","lint":"eslint . --ext .ts","test":"yarn run build && tape test/test.js","publish-for-real":"npm publish --registry https://registry.npmjs.org/ --access public","publish-dry-run":"npm publish --registry https://registry.npmjs.org/ --access public --dry-run"},"devDependencies":{"@typescript-eslint/eslint-plugin":"4.1.0","@typescript-eslint/parser":"4.1.0","eslint":"7.9.0","rollup":"2.26.11","rollup-plugin-delete":"2.0.0","rollup-plugin-terser":"7.0.2","rollup-plugin-typescript2":"0.27.2","tape":"5.0.1","typescript":"4.0.2"},"gitHead":"448edc000045860fccb2769a87656fd68507243e","bugs":{"url":"https://github.com/samal-rasmussen/png-validator/issues"},"_id":"png-validator@1.0.0","_nodeVersion":"14.10.1","_npmVersion":"6.14.8","dist":{"integrity":"sha512-CROHkbkdnEjxxdHLsua3xonDJ4RNEdlnMiy4i3rJy4mrqwMGemmVcs7sQ7lAY31f37YrB4Y+ybWh9UKx+ETpiQ==","shasum":"10e770a9070a10e3c860da3efe1b699e427beb59","tarball":"https://registry.npmjs.org/png-validator/-/png-validator-1.0.0.tgz","fileCount":12,"unpackedSize":32611,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYTegCRA9TVsSAnZWagAAAk8P/3jKrtpwIVqNyjySnyXY\n/52KSV4o5lbsAw6MdVHKMmYRLqOf1OfiTDZgbjlsvCgTabcAgwCotdeffGPm\nrOWS6C3TJp29v+GvAV8HvhUqHIR3lN4VND274rNUSeYdnLuIb+jCx50bqTOk\nma5UsrrnecEPagm8OJ1KxjWCQk19XVAYNwEbgQGF/qAyXdzxwBsV+1xdAAfZ\nbShNsvYcm6o9VHyJq9GCMZ3fTYMl0MTBm+SeRxsZXAtK/8hqfD9qD6i2Nt1m\nNuCJImkWyiqGXwXApJbS2LZywA7cxrfHButZZqegpAyoaaTKYu3mvoSkrJBB\nM6Wj3C9ek382cqUjGbEDFjY32Ktpo4/et1b5MThGHFoTrmS8ildgtlWr/0wG\ndrD47fBt240xww5iCbJQ8tWKjRdo8hAMSmn1kEj66ANK/e4WrW9R8ArL8ISW\nedIIEDNJc2HbTikOroeqhgjgVhly9ENsP0+4axKrcQhhOWu7ONrer3qs+LPP\nCZBmMetHL25b/9LAaOgWL2rdlP5aTbpnFkSr7E5OD1AzQeeqPY/8DQ1vS+Dn\nZ5cKAzt8PpvJYFiWu7uknH+mKLJALghZHWSr2ciJ7JTtPIoLAUJHdvSMPDtO\nhYeB8LNxrBgJxe7yYzogAw6iLHDNu+mXhFRG6tUqs/dx89QKMRLnFEQHwK/t\n67dE\r\n=wcMl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDoxhSSW/q7KGeUtdpBFzNKGMiYdJieHqhPK3dlhu/bzgIhAPRnhhudgJhMvuxN8GxtxLj02pO1xAiirfx/l1YEffRh"}]},"maintainers":[{"name":"samal-rasmussen","email":"samal84@gmail.com"}],"_npmUser":{"name":"samal-rasmussen","email":"samal84@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/png-validator_1.0.0_1600206751999_0.3776315542410966"},"_hasShrinkwrap":false},"1.1.0":{"name":"png-validator","version":"1.1.0","description":"Png validator checks Png files for corruption","main":"dist/index.cjs.js","module":"dist/index.es.js","types":"dist/index.d.ts","author":{"name":"Sámal Rasmussen"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/samal-rasmussen/png-validator.git"},"homepage":"https://github.com/samal-rasmussen/png-validator","keywords":["png","png-validator","png-validate","validator","validate","valid","invalid","corruption","corrupt","correct","checker"],"sideEffects":false,"scripts":{"build":"rollup -c && tsc","lint":"eslint . --ext .ts","test":"npm run build && tape test/test.js","publish-for-real":"npm publish --registry https://registry.npmjs.org/ --access public","publish-dry-run":"npm publish --registry https://registry.npmjs.org/ --access public --dry-run"},"devDependencies":{"@typescript-eslint/eslint-plugin":"5.0.0","@typescript-eslint/parser":"5.0.0","eslint":"8.0.1","rollup":"2.58.0","rollup-plugin-delete":"2.0.0","rollup-plugin-terser":"7.0.2","rollup-plugin-typescript2":"0.30.0","tape":"5.3.1","typescript":"4.4.4"},"gitHead":"7a2b75c834b732a2dc975a93349b83f5ccec72ae","bugs":{"url":"https://github.com/samal-rasmussen/png-validator/issues"},"_id":"png-validator@1.1.0","_nodeVersion":"16.6.2","_npmVersion":"7.19.1","dist":{"integrity":"sha512-MlRLyPI1p3/dJbsjVH+4xOPucycrz8T3EvO0BzCXaNtrUhZkZROtzib9J6mnC81AJO8eBIwiDZwTFel2cMmSuQ==","shasum":"f7f88122707268045f709061526308d73d105627","tarball":"https://registry.npmjs.org/png-validator/-/png-validator-1.1.0.tgz","fileCount":9,"unpackedSize":24999,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2215CRA9TVsSAnZWagAACB0P/0DGsFPZryLRqEqrhKFG\ntZK04+ngtnbJM1KxQCdQzYtN6us03lTrL6Zc47c4hetBwdvx0ANJOyEaS8+A\nvFQcJzbAO/lAD9F9SRW/Nx0mE7NxFmnsevvC/+cGZyol8PR5yXg5IJn6AYPi\nINDut3gCREuWF1Ne8KFUTBihsQEgIlLj5HhqYwajvfWuvZKwJkvN8/YxfsZL\n1mqAN4bkiNm6Lar5nkX5bqXMbXX+guVdUvjm7YXkuQ5eVVGA4QC6DsVk1n2k\nD5x4G5zSkpM0DWtLjlFk4MkpRXxLbUZwHV4QML7Cz8wzSr83wo5BCpQIgBNx\nIu8fS/Jl6XEsKNQHKmeIyGYNj3Wr40sSEy943CJOMhGbG6CdxQM/1nQLwHtt\nuXGXruhKc4hXYspzPRck8FmLSX1kznUC71smpA06vlpU04e5IwCSVRgRgAzh\nqtHLrBFHsTECP4wG26uZV0+zQ3NpNiMFXRfm6jtByiGJYCrBZ+F/avlYWI7a\nKpmQC3oVLLnVCSYUnsE7rhAdVJpUUaGTTbnGSpiiVVdkqJas0g907EteVmWh\ny9OgSCxaofmXk7KPAmcsAtHRCxnEu18JwI0VB7RNy1ttTeKeNkI0I/NdH02g\nOA6Azyqy85k6QRhdHEyqhsHAen3/DBrnGkTE0StwtXM7ZcP1Nv9Mounq63DM\nzUew\r\n=8xKt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC8ezz6D8X/8TXNJ9XACFmDJMnaC8PuD6acHKyOFKCa7gIgXhMmYxa/BYnV1XnX+TdiuaaZwPLz6WvWF/v4r81tgNY="}]},"_npmUser":{"name":"samal-rasmussen","email":"samal84@gmail.com"},"directories":{},"maintainers":[{"name":"samal-rasmussen","email":"samal84@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/png-validator_1.1.0_1634559349257_0.2761053578564945"},"_hasShrinkwrap":false},"2.0.0":{"name":"png-validator","version":"2.0.0","description":"Png validator checks Png files for corruption","type":"module","exports":{".":{"types":"./index.d.ts","import":"./index.js"}},"author":{"name":"Sámal Rasmussen"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/samal-rasmussen/png-validator.git"},"homepage":"https://github.com/samal-rasmussen/png-validator","keywords":["png","png-validator","png-validate","png-validation","validator","validate","validation","valid","invalid","corruption","corrupt","correct","correction","checker"],"sideEffects":false,"scripts":{"build":"dts-buddy","check":"tsc -w","test":"node --test","publish":"npm publish --registry https://registry.npmjs.org/ --access public"},"devDependencies":{"@types/node":"20.9.0","dts-buddy":"0.4.0","typescript":"5.2.2"},"_id":"png-validator@2.0.0","gitHead":"dd4da60a30afb7c8b914e59644c7042582b9a7b5","types":"./index.d.ts","bugs":{"url":"https://github.com/samal-rasmussen/png-validator/issues"},"_nodeVersion":"20.9.0","_npmVersion":"10.1.0","dist":{"integrity":"sha512-4nj0sX1/3Jc8q+JddRvAaD6BZTTo3t+WnlyM0A0xGqq1nHVZQeMCiEXkATPRPvbPR8qQydMXIfFyo9PEIkEpnw==","shasum":"1bdfb17675891cba54483f0f12bac588032a46ed","tarball":"https://registry.npmjs.org/png-validator/-/png-validator-2.0.0.tgz","fileCount":6,"unpackedSize":10666,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFRbOuG0TnM6Hm/h87Ayr5HN4urRie2Ou3BTEh3DzmoGAiEAikuiNLA0WVpaqqCRpd9SQ66yvP6lrRajgcJ3OHvidc4="}]},"_npmUser":{"name":"samal-rasmussen","email":"samal84@gmail.com"},"directories":{},"maintainers":[{"name":"samal-rasmussen","email":"samal84@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/png-validator_2.0.0_1700135861861_0.7468725489152979"},"_hasShrinkwrap":false}},"time":{"created":"2020-09-15T21:52:31.947Z","1.0.0":"2020-09-15T21:52:32.150Z","modified":"2023-11-16T11:57:42.275Z","1.1.0":"2021-10-18T12:15:49.434Z","2.0.0":"2023-11-16T11:57:42.107Z"},"maintainers":[{"name":"samal-rasmussen","email":"samal84@gmail.com"}],"description":"Png validator checks Png files for corruption","homepage":"https://github.com/samal-rasmussen/png-validator","keywords":["png","png-validator","png-validate","png-validation","validator","validate","validation","valid","invalid","corruption","corrupt","correct","correction","checker"],"repository":{"type":"git","url":"git+https://github.com/samal-rasmussen/png-validator.git"},"author":{"name":"Sámal Rasmussen"},"bugs":{"url":"https://github.com/samal-rasmussen/png-validator/issues"},"license":"MIT","readme":"## Png Validator\r\n\r\nChecks Png files for corruption.\r\n\r\nThis code is cut out of the much more comprehensive https://github.com/lukeapage/pngjs, so you can have a minimal implementation that only does png file validation.\r\n\r\nIt checks that the chunk layout is correct, and it checks that the crc code for each chunk is valid.\r\n\r\nZero dependencies and only 2.6 kb after minification.\r\n\r\nAvailable as an npm package: https://www.npmjs.com/package/png-validator\r\n\r\n## Usage\r\n\r\nThere is only a single function exposed called `pngValidator` that takes a single parameter, which is an Uint8Array with the raw Png file data. It will throw an error if the file is _not_ valid.\r\n\r\n```\r\nimport { pngValidator } from 'png-validator';\r\n\r\ntry {\r\n\tpngValidator(buffer);\r\n\t// success\r\n} catch (e) {\r\n\t// file is invalid or corrupt\r\n\tconsole.error(e);\r\n}\r\n```\r\n\r\nFrom version 2.0 on there is only an esm version of Png Validator. Use v. 1.1 if you need commonjs.\r\n","readmeFilename":"README.md"}