node/tools/eslint/node_modules/require-uncached
Rich Trott 6a76485ad7 tools: update ESLint to 2.9.0
ESLint 2.9.0 fixes some minor bugs that we have been experiencing and
introduces some new rules that we may wish to consider.

PR-URL: https://github.com/nodejs/node/pull/6498
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-06-23 17:25:14 -07:00
..
index.js tools: update ESLint to 2.7.0 2016-05-17 17:24:47 -07:00
package.json tools: update ESLint to 2.9.0 2016-06-23 17:25:14 -07:00
readme.md tools: update ESLint to 2.7.0 2016-05-17 17:24:47 -07: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
var i = 0;
module.exports = function () {
	return ++i;
};
var requireUncached = require('require-uncached');

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

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

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

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

License

MIT © Sindre Sorhus