Nitrogenous Polymorphic Molecule
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

require-uncached

1.0.3 • 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

install

npm i require-uncached

Downloadsweekly downloads

2,705,841

version

1.0.3

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability