This package has been deprecated

Author message:

Renamed to `import-fresh`.

require-uncached

2.0.0 • Public • Published

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

Related

License

MIT © Sindre Sorhus

Package Sidebar

Install

npm i require-uncached

Weekly Downloads

1,005,371

Version

2.0.0

License

MIT

Unpacked Size

3.53 kB

Total Files

4

Last publish

Collaborators

  • sindresorhus