refreshable-require

0.1.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i refreshable-require

Weekly Downloads

0

Version

0.1.0

License

MIT

Last publish

Collaborators

  • richraid21