{"name":"dint","version":"1.0.0","description":"Generate and verify directory integrity","main":"index.js","files":["index.js"],"scripts":{"test":"node test","md":"mos"},"repository":{"type":"git","url":"git+https://github.com/zkochan/dint.git"},"keywords":["integrity","sri","directory","fs"],"author":{"name":"Zoltan Kochan","email":"zoltan.kochan@gmail.com","url":"http://kochan.io"},"license":"MIT","bugs":{"url":"https://github.com/zkochan/dint/issues"},"homepage":"https://github.com/zkochan/dint#readme","dependencies":{"bluebird":"^3.5.0","graceful-fs":"^4.1.11","p-every":"^1.0.2","ssri":"^4.1.6"},"devDependencies":{"mos":"^2.0.0-alpha.3","mos-plugin-readme":"^1.0.4","tape":"^4.6.3"},"mos":{"plugins":["readme"],"installation":{"useShortAlias":true}},"engines":{"node":">=4"},"gitHead":"9569504152b5cb42ae5a59a2f412546088a3bc12","_id":"dint@1.0.0","_shasum":"4bfec818b3a6572b328bdea8d051ccd5de580c44","_from":".","_npmVersion":"3.10.9","_nodeVersion":"6.9.1","_npmUser":{"name":"zkochan","email":"zoltan.kochan@gmail.com"},"dist":{"shasum":"4bfec818b3a6572b328bdea8d051ccd5de580c44","tarball":"http://registry-npm.ywwl.com/dint/download/dint-1.0.0.tgz","integrity":"sha512-p0k4J6SWcxykCybR53GedvoGieFCELgSfbbAimtQopwt3qcE+lFinZWHXSOuWhMQXLwxvqO0uWszLk/6U6IWeQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDoe3dXx0wJrZDf3r6AYRPrj0DS3xm+geRItQLi86JYKwIgEsQFfZMSx8NM2B8ixPJ5rYWOdUzF2SZHXJ/Pq+j0dnM="}],"size":2880,"noattachment":false,"key":"/dint/-/dint-1.0.0.tgz"},"maintainers":[{"name":"zkochan","email":"zoltan.kochan@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dint-1.0.0.tgz_1497250189706_0.08924715244211257"},"directories":{},"readme":"# dint\n\n> Generate and verify directory integrity\n\n<!--@shields('npm', 'travis')-->\n[![npm version](https://img.shields.io/npm/v/dint.svg)](https://www.npmjs.com/package/dint) [![Build Status](https://img.shields.io/travis/zkochan/dint/master.svg)](https://travis-ci.org/zkochan/dint)\n<!--/@-->\n\nThis package is mostly a copy/paste from [@zkat](https://github.com/zkat)'s [cadr](https://github.com/zkat/cadr) excluding the [cacache](https://github.com/zkat/cacache) usages.\n\n**Important!** A directory is not considered modified if a file was added.\nA directory is considered modified if a file was modified or removed.\n\n## Installation\n\n```sh\nnpm i -S dint\n```\n\n## API\n\n### `from(dirname): Promise<DirectoryIntegrity>`\n\nReturns a mapping of file names to size and [Subresource Integrity](https://w3c.github.io/webappsec-subresource-integrity/) of each file.\n\nResult example:\n\n```js\n{\n 'test/fixtures/4/lib/bar.js':\n   { generatingIntegrity: Promise<'sha512-1B0QjibzjRrYeSf79Hcy9T1t8KNt4cFpz//88geXTN6lDnUzMo+4o/MJDESUs884XdZ5EX4RLdzsJA8qeEV3lg=='>,\n     size: 198 },\n  'test/index.js':\n   { generatingIntegrity: Promise<'sha512-X6ypBcefaTDbDHHcR0J57E2dvDv6vAVi7tHAhfDImmDU8LBaYwdkdX+hVlqFdWNevJjRqsgZbXb/c+Ewq5t3tQ=='>,\n     size: 939 } }\n```\n\n### `check(dirname, directoryIntegrity): Promise<Boolean>`\n\nVerifies directory integrity against a `directoryIntegrity` argument.\n\nE.g.:\n\n```js\ncheck('dirname', {\n 'test/fixtures/4/lib/bar.js':\n   { integrity: 'sha512-1B0QjibzjRrYeSf79Hcy9T1t8KNt4cFpz//88geXTN6lDnUzMo+4o/MJDESUs884XdZ5EX4RLdzsJA8qeEV3lg==',\n     size: 198 },\n  'test/index.js':\n   { integrity: 'sha512-X6ypBcefaTDbDHHcR0J57E2dvDv6vAVi7tHAhfDImmDU8LBaYwdkdX+hVlqFdWNevJjRqsgZbXb/c+Ewq5t3tQ==',\n     size: 939 } })\n```\n\n## License\n\n[MIT](./LICENSE) © [Zoltan Kochan](http://kochan.io)\n","publish_time":1497250190713,"_cnpm_publish_time":1497250190713,"dist-tags":{"latest":"5.1.0","next":"5.0.0"}}