jSync - Module for sync local object variable with *.js or *.coffee file
======
Installation
$ npm install jsync
Simple usage
var jsync = ;var obj = ; // also you can load *.js, *.cson and *.coffee files // now object will keep in sync with json-file
Set interval
var obj = ; // file check every 100ms
Set context for eval
// data.js someVariable: thisprop
Context can only be the Object
context = prop: 'value' ;var obj = ;console; // { someVariable: 'value' }
Set handler
// data.js1234
{ arr;}var obj = ;console; // [1,2]
All-in-one call
var obj = ; // all arguments are optional except `file`
Cancel sync and remove watcher
jsync;
Simple read without sync
var obj = jsync;
Manual sync with or without new context
jsync;
Save synced object to file
var obj = ;jsync; // if fileName not set it will use 'data.js'
function will execute asynchronously if callback is set
Run some tests
$ cd /path/to/jsync/$ npm test