module-invalidate
module-invalidate copied to clipboard
return true/false on attempt to invalidate module
invalidateByExports, invalidateByPath, prototype.invalidate to return true if module invalidable, otherwise false
Project using this want to log when a module is refreshed. This allows change allows
if (module.invalidateByPath(require_path)){ app.log.info(
module refreshed: ${require_path}) obj.fn = require(require_path) }