From 982afe679ff6b1cb204db5cd92a238de2f7e85dc Mon Sep 17 00:00:00 2001 From: Bill Christo Date: Wed, 21 Sep 2016 17:22:55 -0400 Subject: [PATCH 1/5] Update README.md --- README.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 72b74fe..e488d28 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,26 @@ # [filejson](https://github.com/bchr02/filejson) -Use a JSON file to automatically save a JavaScript object to disk whenever it changes. +Use a JSON encoded file to automatically save a JavaScript value to disk whenever that value changes. A value can be a Javascript string, number, boolean, null, object, or an array. The value can be structured in an array or an object to allow for more complex data stores. These structures can also be nested. As a result, you can use this module as a simple document store or Document-oriented database. ## Requirements [ECMAScript 6 Reflect and Proxy objects](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) support, which is found natively in Node.js >= 6. If you are using a version of Node.js < 6, use a polyfill, such as [harmony-reflect](https://github.com/tvcutsem/harmony-reflect). Proxy support is key for this module working so eloquently. Other non-Proxy based modules require function calls each time you wish to save an object. Unlike those, [filejson](https://github.com/bchr02/filejson) is as easy as ```file.contents = "my new value"``` or ```file.contents = {"msg": "Hello World"}``` and the changes are automatically saved to disk. -## Install (Node.js >= 6) +## Installation + ```javascript npm install filejson --save ``` -## Install (Node.js < 6) -If you are using a version of Node.js < 6 then you will also need to install a polyfill such as [harmony-reflect](https://github.com/tvcutsem/harmony-reflect): +## Additional installation and usage steps for those using Node.js 5 or earlier + +* You will need a polyfill such as [harmony-reflect](https://github.com/tvcutsem/harmony-reflect): ``` npm install harmony-reflect --save -npm install filejson --save ``` -And then when you want to run your app you will need to use the node --harmony_proxies flag: +* In addition to requiring filejson, you will need to require harmony-reflect at the top of your app, like this: +```javascript +var Reflect = require('harmony-reflect'); +``` +* Lastly, every time you run your app you will need to use the node --harmony_proxies flag, like this: ``` node --harmony_proxies index.js ``` From 0299f94fb4a64f5938554e3a8477641bc471932b Mon Sep 17 00:00:00 2001 From: Bill Christo Date: Wed, 21 Sep 2016 17:37:14 -0400 Subject: [PATCH 2/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e488d28..6602491 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # [filejson](https://github.com/bchr02/filejson) -Use a JSON encoded file to automatically save a JavaScript value to disk whenever that value changes. A value can be a Javascript string, number, boolean, null, object, or an array. The value can be structured in an array or an object to allow for more complex data stores. These structures can also be nested. As a result, you can use this module as a simple document store or Document-oriented database. +Use a JSON encoded file to automatically save a JavaScript value to disk whenever that value changes. A value can be a Javascript: string, number, boolean, null, object, or an array. The value can be structured in an array or an object to allow for more complex data stores. These structures can also be nested. As a result, you can use this module as a simple document store or Document-oriented database. ## Requirements [ECMAScript 6 Reflect and Proxy objects](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) support, which is found natively in Node.js >= 6. If you are using a version of Node.js < 6, use a polyfill, such as [harmony-reflect](https://github.com/tvcutsem/harmony-reflect). Proxy support is key for this module working so eloquently. Other non-Proxy based modules require function calls each time you wish to save an object. Unlike those, [filejson](https://github.com/bchr02/filejson) is as easy as ```file.contents = "my new value"``` or ```file.contents = {"msg": "Hello World"}``` and the changes are automatically saved to disk. From c94f7cf2af07a6dfcb54b0d7e15ab29666f7dc08 Mon Sep 17 00:00:00 2001 From: Bill Christo Date: Wed, 21 Sep 2016 17:41:23 -0400 Subject: [PATCH 3/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6602491..032636d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # [filejson](https://github.com/bchr02/filejson) -Use a JSON encoded file to automatically save a JavaScript value to disk whenever that value changes. A value can be a Javascript: string, number, boolean, null, object, or an array. The value can be structured in an array or an object to allow for more complex data stores. These structures can also be nested. As a result, you can use this module as a simple document store or Document-oriented database. +Use a JSON encoded file to automatically save a JavaScript value to disk whenever that value changes. A value can be a Javascript: string, number, boolean, null, object, or an array. The value can be structured in an array or an object to allow for more complex data stores. These structures can also be nested. As a result, you can use this module as a simple document store or Document-oriented database for storing semi structured data. ## Requirements [ECMAScript 6 Reflect and Proxy objects](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) support, which is found natively in Node.js >= 6. If you are using a version of Node.js < 6, use a polyfill, such as [harmony-reflect](https://github.com/tvcutsem/harmony-reflect). Proxy support is key for this module working so eloquently. Other non-Proxy based modules require function calls each time you wish to save an object. Unlike those, [filejson](https://github.com/bchr02/filejson) is as easy as ```file.contents = "my new value"``` or ```file.contents = {"msg": "Hello World"}``` and the changes are automatically saved to disk. From 080f8bcfc2c2c3ed5fe4d1376e2e86274a859efb Mon Sep 17 00:00:00 2001 From: Bill Christo Date: Wed, 21 Sep 2016 17:44:13 -0400 Subject: [PATCH 4/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 032636d..83544cd 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # [filejson](https://github.com/bchr02/filejson) -Use a JSON encoded file to automatically save a JavaScript value to disk whenever that value changes. A value can be a Javascript: string, number, boolean, null, object, or an array. The value can be structured in an array or an object to allow for more complex data stores. These structures can also be nested. As a result, you can use this module as a simple document store or Document-oriented database for storing semi structured data. +Use a JSON encoded file to automatically save a JavaScript value to disk whenever that value changes. A value can be a Javascript: string, number, boolean, null, object, or an array. The value can be structured in an array or an object to allow for more complex data stores. These structures can also be nested. As a result, you can use this module as a simple document store for storing semi structured data. ## Requirements [ECMAScript 6 Reflect and Proxy objects](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) support, which is found natively in Node.js >= 6. If you are using a version of Node.js < 6, use a polyfill, such as [harmony-reflect](https://github.com/tvcutsem/harmony-reflect). Proxy support is key for this module working so eloquently. Other non-Proxy based modules require function calls each time you wish to save an object. Unlike those, [filejson](https://github.com/bchr02/filejson) is as easy as ```file.contents = "my new value"``` or ```file.contents = {"msg": "Hello World"}``` and the changes are automatically saved to disk. From f87bca4e6c1816dcb3b148aa85e1ab2363b8c2eb Mon Sep 17 00:00:00 2001 From: Bill Christo Date: Wed, 21 Sep 2016 17:49:35 -0400 Subject: [PATCH 5/5] Update package.json --- package.json | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index fab2552..5b4ec0f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "filejson", - "version": "1.0.4", - "description": "Use a JSON file to automatically save a JavaScript object to disk whenever it changes.", + "version": "1.0.5", + "description": "Use a JSON encoded file to automatically save a JavaScript value to disk whenever that value changes.", "main": "app.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" @@ -18,13 +18,26 @@ "drive", "stateful", "storage", - "hard drive", + "hard", + "drive", "json", + "semi", + "structured", + "data", + "document-oriented", + "database", + "document-store", + "document", + "noSQL", + "Semi-structured", + "structured", + "structured-data", "ES6", "Proxy", "Proxies", "auto", "autosave", + "auto-save", "automatically" ] }