NuclearDispersionSystem/ant-design-vue-jeecg/node_modules/require-uncached
2023-09-14 14:47:11 +08:00
..
node_modules/resolve-from 111 2023-09-14 14:47:11 +08:00
index.js 111 2023-09-14 14:47:11 +08:00
license 111 2023-09-14 14:47:11 +08:00
package.json 111 2023-09-14 14:47:11 +08:00
readme.md 111 2023-09-14 14:47:11 +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