-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow append to existing object; allow user-provided read/write funct…
…ions The following changes are included here: 1. New Method: append A new `append` method has been added. Whereas the traditional calls such as ``` store.set('a', { b : c }); store.set('a', { d : e }); ``` allows the second call to overwrite the entire value of 'a', yielding ``` { d : e } ``` this sequence: ``` store.append('a', { b : c }); store.append('a', { d : e }); ``` ratains prior values, and thus yields: ``` { b : c, d : e } ``` 2. The means of reading (and parsing), and writing to files can now be overridden by the caller, in the `options` argument. This allows adding additional error handling, in the simple case, or reading and writing entirely different types of files in the more sophisticated case. An example is provided in `examples/ini.js` that shows the store reading and writing an INI file, while allowing it to be manipulated programmatically in the standard data-store fashion.
- Loading branch information
Showing
3 changed files
with
70 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters