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.
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')
yarn test
MIT