Popularity
2.8
Growing
Activity
4.7
Growing
180
9
17

Monthly Downloads: 0
Programming language: JavaScript
License: MIT License
Tags: Miscellaneous     Module     Require     Bypass     Fresh     Uncached     Uncache     Cache    
Latest version: v3.1.0

require-uncached alternatives and similar modules

Based on the "Miscellaneous" category

Do you think we are missing an alternative of require-uncached or a related project?

Add another 'Miscellaneous' Module

README

import-fresh Build Status

Import a module while bypassing the cache

Useful for testing purposes when you need to freshly import a module.

Install

$ npm install import-fresh

Usage

// foo.js
let i = 0;
module.exports = () => ++i;
const importFresh = require('import-fresh');

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

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

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

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

Get professional support for this package with a Tidelift subscription Tidelift helps make open source sustainable for maintainers while giving companiesassurances about security, maintenance, and licensing for their dependencies.