nor-json-file

0.0.1 • Public • Published

nor-json-file

Prototype of JSON file editing with JSON diff based transactions.

var file = 'samples/test.json';
var JSONFile = require('nor-json-file');
JSONFile.open(file).then(function(data) {
	data.messages.push( {'subject':'Hello', 'body':'This is a test message.'} );
	return data.commit();
}).then(function() {
	util.debug('Successfully edited '+file);
}).fail(function(err) {
	/* ... */
}).done();

/* EOF */

Readme

Keywords

none

Package Sidebar

Install

npm i nor-json-file

Weekly Downloads

0

Version

0.0.1

License

MIT

Last publish

Collaborators

  • jhh