ember-legacy-class-transform
Version:
The default blueprint for ember-cli addons.
34 lines (21 loc) • 1.27 kB
Markdown
Generate a hash representing the stats of this module files and all its descendents files.
```js
var hashForDep = require('hash-for-dep');
hashForDep('rsvp'); // if RSVP is a dependency of the current project, you will get a checksum for it
hashForDep('rsvp', 'path/to/other/project'); // you will get a checksum for RSVP resolved relative to the provided root
```
NOTE: By default, these hashes are cached for the life of the process. As this
is the same strategy node uses for `require(x)` we can safely follow suite.
That being said, some scenarios may exist where this is not wanted. So just
like `require._cache` exists, we provide the following options:
```js
require('hash-for-dep')._resetCache();
```
```js
var hashForDep = require('hash-for-dep');
hashForDep(name, path, null, false /* this mysterious argument should be set to false */);
```