Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

refresh-config

0.0.4 • Public • Published

refresh-config

NPM version Build Status

refresh config when config file modified.

Install

npm install refresh-config

Usage

var Config = require('refresh-config');
 
var config = Config('./config.json');
 
config.on('error', function (err) {
  console.error(err.stack);
})
config.on('change', function () {
  console.log(config.data); // the new data object
  console.log(config.stale); // the stale object
  console.log(config.removed);  // removed keys
});
 

License

MIT

Install

npm i refresh-config

DownloadsWeekly Downloads

2

Version

0.0.4

License

MIT

Last publish

Collaborators

  • avatar