We have been stalled on ESLint 3.8.0 for some time. Current ESLint is 3.13.0. We have been unable to upgrade because of more aggressive reporting on some rules, including indentation. ESLint configuration options and bugfixes are now such that we can reasonably upgrade. PR-URL: https://github.com/nodejs/node/pull/10561 Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
47 lines
833 B
Markdown
47 lines
833 B
Markdown
# require-uncached [](https://travis-ci.org/sindresorhus/require-uncached)
|
|
|
|
> Require a module bypassing the [cache](https://nodejs.org/api/modules.html#modules_caching)
|
|
|
|
Useful for testing purposes when you need to freshly require a module.
|
|
|
|
|
|
## Install
|
|
|
|
```
|
|
$ npm install --save require-uncached
|
|
```
|
|
|
|
|
|
## Usage
|
|
|
|
```js
|
|
// foo.js
|
|
let i = 0;
|
|
module.exports = () => ++i;
|
|
```
|
|
|
|
```js
|
|
const requireUncached = require('require-uncached');
|
|
|
|
require('./foo')();
|
|
//=> 1
|
|
|
|
require('./foo')();
|
|
//=> 2
|
|
|
|
requireUncached('./foo')();
|
|
//=> 1
|
|
|
|
requireUncached('./foo')();
|
|
//=> 1
|
|
```
|
|
|
|
|
|
## Related
|
|
|
|
- [clear-require](https://github.com/sindresorhus/clear-require) - Clear a module from the require cache
|
|
|
|
|
|
## License
|
|
|
|
MIT © [Sindre Sorhus](https://sindresorhus.com)
|