Home

Awesome

Getset

An easier way of handling config options for client-side apps. Specially when it comes to changing settings and upgrading.

Usage

var config = require('getset').load('/path/to/config/file');

config.set('foo', 'bar');
config.get('foo'); // 'bar'

config.save(function(err){
  if (!err) console.log('Saved successfully!')
})

Bells & whistles

var config = require('getset');

config.load('/file/that/will/be/read/asynchronously', function(err){

  if (!err) config.update('foo', 'bar'); // will set() and save()

  config.on('changed', function(){
    console.log('Hold on, someone just changed something!')
  })

  config.watch();
})

Features

Credits

Written by Tomás Pollak.

Copyright

(c) 2012 Fork Ltd. MIT licensed.