0.1.0 • Published 6 years ago

refreshable-require v0.1.0

Weekly downloads
6
License
MIT
Repository
github
Last release
6 years ago

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 test

License

MIT