Socket
Socket
Sign inDemoInstall

require-uncached

Package Overview
Dependencies
3
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    require-uncached

Require a module bypassing the cache


Version published
Maintainers
1
Install size
14.6 kB
Created

Readme

Source

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
  • clear-require - Clear a module from the require cache

License

MIT © Sindre Sorhus

Keywords

FAQs

Last updated on 04 Nov 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc