node/tools/eslint/node_modules/require-uncached
cjihrig ba73a67d45 tools: update to ESLint 4.10.0
PR-URL: https://github.com/nodejs/node/pull/16738
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
2017-12-13 16:59:02 +00:00
..
index.js tools: update ESLint to current version 2017-01-06 14:36:27 -08:00
license tools: update ESLint to current version 2017-01-06 14:36:27 -08:00
package.json tools: update to ESLint 4.10.0 2017-12-13 16:59:02 +00:00
readme.md tools: update ESLint to current version 2017-01-06 14:36:27 -08:00

require-uncached Build Status

Require a module bypassing the cache

Useful for testing purposes when you need to freshly require a module.

Install

$ npm install --save require-uncached

Usage

// foo.js
let i = 0;
module.exports = () => ++i;
const requireUncached = require('require-uncached');

require('./foo')();
//=> 1

require('./foo')();
//=> 2

requireUncached('./foo')();
//=> 1

requireUncached('./foo')();
//=> 1

License

MIT © Sindre Sorhus