{"name":"hash-for-dep","version":"0.0.2","description":"generates a hash that represents a module and its depenencies uniqueness","main":"index.js","scripts":{"test":"mocha tests/**/*-test.js tests/jshint.spec.js","test:debug":"mocha debug tests/**/*-test.js tests/jshint.spec.js"},"repository":{"type":"git","url":"git+https://github.com/stefanpenner/hash-for-dep.git"},"author":{"name":"Stefan Penner","email":"stefan.penner@gmail.com"},"license":"ISC","bugs":{"url":"https://github.com/stefanpenner/hash-for-dep/issues"},"homepage":"https://github.com/stefanpenner/hash-for-dep#readme","dependencies":{"broccoli-kitchen-sink-helpers":"^0.2.6","resolve":"^1.1.6"},"devDependencies":{"mocha":"^2.2.4","mocha-jshint":"^1.0.0"},"gitHead":"92ac9552a216e219589f3c5b7ce7c4573c4d9f18","_id":"hash-for-dep@0.0.2","_shasum":"a47b9fcc5d28139b2b691a1d374981cf0f7d00fd","_from":".","_npmVersion":"2.7.6","_nodeVersion":"0.12.2","_npmUser":{"name":"stefanpenner","email":"stefan.penner@gmail.com"},"maintainers":[{"name":"stefanpenner","email":"stefan.penner@gmail.com"},{"name":"jayphelps","email":"hello@jayphelps.com"}],"dist":{"shasum":"a47b9fcc5d28139b2b691a1d374981cf0f7d00fd","tarball":"http://registry-npm.ywwl.com/hash-for-dep/download/hash-for-dep-0.0.2.tgz","integrity":"sha512-mRUIR+M6urd9UT7u23iHP2aJkapnQU+vNDubZIzCsdCC2KohMWzK4W/RWePhHTJIA5C6Idcq9NxU9vNi72BetQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCV7UxIk/N6zJuKCLY+WU5dSnp6wjTTKkH3Iwzd/KBVAQIgMOPWtKF7OCT/XP3w+mgJ9G6mdQW0XKG9lA7SUCgithA="}],"size":6124,"noattachment":false,"key":"/hash-for-dep/-/hash-for-dep-0.0.2.tgz"},"directories":{},"readme":"# hash-for-dep [![Build Status](https://travis-ci.org/stefanpenner/hash-for-dep.svg?branch=stuff)](https://travis-ci.org/stefanpenner/hash-for-dep) [![Build status](https://ci.appveyor.com/api/projects/status/wf2u3j6lc52hdd21?svg=true)](https://ci.appveyor.com/project/embercli/hash-for-dep)\n\nGenerate a hash representing the stats of this module files and all its descendents files.\n\n\n```js\nvar hashForDep = require('hash-for-dep');\n\nhashForDep('rsvp'); // if RSVP is a dependency of the current project, you will get a checksum for it\nhashForDep('rsvp', 'path/to/other/project'); //  you will get a checksum for RSVP resolved relative to the provided root\n```\n\n## What does Hash For Dep consider a dependency?\n\nHashForDep respects the [node resolution algorithim](https://nodejs.org/api/modules.html#modules_all_together).\n\nFor example given:\n\n```\nfoo/package.json\nfoo/index.js\nfoo/node_modules/a/\nfoo/node_modules/a/package.json\nfoo/node_modules/a/index.js\nfoo/node_modules/a/node_modules/b\nfoo/node_modules/a/node_modules/b/package.json\nfoo/node_modules/a/node_modules/b/index.js\nfoo/node_modules/a/node_modules/f\nfoo/node_modules/a/node_modules/f/index.js\nfoo/node_modules/a/node_modules/f/package.json\nfoo/node_modules/c\nfoo/node_modules/c/index.js\nfoo/node_modules/c/package.json\nfoo/node_modules/d\nfoo/node_modules/d/index.js\nfoo/node_modules/d/package.js\n```\n\nwhere `foo/package.json` depends on `a` and `c` but not `d`\nand `foo/node_modules/a/package.json` depends on `b` not `f`\n\nHashForDep will consider: `a` `c` `b` as dependencies, and simply ignore `d` and `f`.\nWhen HashForDep considers a dependency, it will stat each of its files and those of its dependencies.\n\n\n## Cache\n\nNOTE: By default, these hashes are cached for the life of the process. As this\nis the same strategy node uses for `require(x)` we can safely follow suit.\n\nThat being said, some scenarios may exist where this is not wanted. So just\nlike `require._cache` exists, we provide the following options:\n\n#### To evict the cache manually (maybe for testing)\n\n```js\nrequire('hash-for-dep')._resetCache();\n```\n\n#### To opt out of the cache on a per invocation basis\n\n```js\nvar hashForDep = require('hash-for-dep');\n\nhashForDep(name, path, null, false /* this mysterious argument should be set to false */);\n```\n","publish_time":1428962098711,"_cnpm_publish_time":1428962098711,"dist-tags":{"latest":"1.5.2"}}