Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

readme.md 833B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # require-uncached [![Build Status](https://travis-ci.org/sindresorhus/require-uncached.svg?branch=master)](https://travis-ci.org/sindresorhus/require-uncached)
  2. > Require a module bypassing the [cache](https://nodejs.org/api/modules.html#modules_caching)
  3. Useful for testing purposes when you need to freshly require a module.
  4. ## Install
  5. ```
  6. $ npm install --save require-uncached
  7. ```
  8. ## Usage
  9. ```js
  10. // foo.js
  11. let i = 0;
  12. module.exports = () => ++i;
  13. ```
  14. ```js
  15. const requireUncached = require('require-uncached');
  16. require('./foo')();
  17. //=> 1
  18. require('./foo')();
  19. //=> 2
  20. requireUncached('./foo')();
  21. //=> 1
  22. requireUncached('./foo')();
  23. //=> 1
  24. ```
  25. ## Related
  26. - [clear-require](https://github.com/sindresorhus/clear-require) - Clear a module from the require cache
  27. ## License
  28. MIT © [Sindre Sorhus](https://sindresorhus.com)