bahmutov / really-need

Node require wrapper with options for cache busting, pre- and post-processing
MIT License
109 stars 4 forks source link

Expose the cache object #12

Closed bahmutov closed 9 years ago

bahmutov commented 9 years ago

Seems we do not give access to the underlying cache object

require = require('really-need');
Object.keys(require.cache).forEach(function (name) {
    delete require.cache[name];
});
TypeError: Object.keys called on non-object