jsop

by typicode

typicode / jsop

JSON file reader/writer (powered by Object.observe)

209 Stars 13 Forks Last release: Not found MIT License 44 Commits 5 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

jsop

One-way data binding for JSON files

jsop is a JSON file reader/writer powered by Object.observe.

Before

var fs = require('fs')

var config = JSON.parse(fs.readFileSync('config.json')) config.foo = 'bar' fs.writeFile('config.json', JSON.stringify(config), function(err) { if (err) throw err })

After

var jsop = require('jsop')

var config = jsop('config.json') config.foo = 'bar'

Changes are automatically written to file. If file doesn't exist, it will be created.

License

MIT - Typicode

* jsop is short for jsonOpen

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.