JSPM

require-uncached

1.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 923677
  • Score
    100M100P100Q14352F
  • License MIT

Require a module bypassing the cache

Package Exports

  • require-uncached

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (require-uncached) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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
var i = 0;
module.exports = function () {
    return ++i;
};
var requireUncached = require('require-uncached');

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

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

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

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

License

MIT © Sindre Sorhus