refreshable-require
v0.1.0
Published
A wrapper around require() that provides helper functions to manage the lifecycle of the require() cache
Readme
Refreshable Require
A library that augments Node's default require statement. It allows developers to manage the lifecycle of the require() cache. Expiring specific modules/files or clearing the entire cache is supported.
Library is still in development. The API may change or be modified at any point.
Basic Usage
Initialize
const rr = require('./refreshable-require')Use it just like you would the standard require()
const library = rr.require('./my-library')You can then expire it, or get the time it was last reloaded
const timeLastReloaded = rr.age('./my-library')
rr.refresh('./my-library')Test
yarn testLicense
MIT
