node/tools/eslint/node_modules/require-uncached
Rich Trott 31f572c3ea
tools: update to ESLint 4.3.0
PR-URL: https://github.com/nodejs/node/pull/14417
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-09-05 12:50:01 -04:00
..
index.js tools: update ESLint to current version 2017-03-08 17:11:24 -08:00
license tools: update ESLint to current version 2017-03-08 17:11:24 -08:00
package.json tools: update to ESLint 4.3.0 2017-09-05 12:50:01 -04:00
readme.md tools: update ESLint to current version 2017-03-08 17:11:24 -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