requirefresh

Require a file without adding it into the require cache

Require Fresh


Require a file without adding it into the require cache

NPM

  • Use: require('requirefresh')
  • Install: npm install --save requirefresh
// Import 
var requireFresh = require('requirefresh')
 
// Require the module freshly synchronously (will throw errors) 
try {
    var result = requireFresh('my-module-path')
} catch (error) {}
 
// Require the fresh module synchronously (will callback with error and result) 
requireFresh.safe('my-module-path', function(error,result){
    if (error) {
        // error 
    } else {
        // success 
    }
})

Discover the change history by heading on over to the HISTORY.md file.

Discover how you can contribute by heading on over to the CONTRIBUTING.md file.

These amazing people are maintaining this project:

  • Benjamin Lupton b@lupton.cc (https://github.com/balupton)

No sponsors yet! Will you be the first?

These amazing people have contributed code to this project:

Become a contributor!

Unless stated otherwise all works are:

  • Copyright © 2013+ Bevry Pty Ltd us@bevry.me (http://bevry.me)
  • Copyright © 2011+ Benjamin Lupton b@lupton.cc (http://balupton.com)

and licensed under: