Skip to content

awlayton/node-require-no-cached

Repository files navigation

Build Status Coverage Status Dependency Status License

node-require-no-cached

This module is essentially node's require, but every time a module is loaded with node-require-no-cached tha module is loaded as if it is its first time being required.

I wrote this for testing modules in the node REPL. I wanted to be able to change the code and then require my module again and get the current version of the code without restarting the REPL.

Installation

npm install node-require-no-cached

Usage

var rerequire = require('require-no-cached');

// Use it just like require
var mod = rerequire('module-slug');

/* Do stuff with normally mod */

About

A wrapper for require which loads modules even if they are cached.

Resources

License

Stars

Watchers

Forks

Packages

No packages published