SimpleGlobals
Simple Globals implementation, inspired by Mumps Globals.
Installation
Via npm on Node:
npm install simpleglobals
Usage
Reference in your program:
var simpleglobals = ;
Create a database:
var db = simpleglobals;
Get a node:
var customer = db;
Set and get a value:
dbvalue'Adam';var name = dbvalue;
Alternatively, you can use a node:
var adam = db;adamvalue'Adam';var name = adamvalue;
A node can be converted to a plain JavaScript object:
dbvalue'Adam';dbvalue800; var obj = db;// obj is { name : 'Adam', age: 800 }
A node can be defined from a plain JavaScript object:
db;
Development
git clone git://github.com/ajlopez/SimpleGlobals.git
cd SimpleGlobals
npm install
npm test
Samples
TBD
To do
- Persistence
- Samples
The current implementation is a naive one, all in-memory. It should be refactored to have a persistence store, using a database, file system, o NoSQL provider.
References
- A Universal NoSQL Engine, Using a Tried and Tested Technology.
- Extreme Database programming with MUMPS Globals, Chapter 1.
Inception
This module was inspired by the discussion Healthcare needs the help of the Node.js Community at Node.js mailing list, triggered by @rtweed.
Versions
- 0.0.1: Published.
Contribution
Feel free to file issues and submit pull requests � contributions are welcome.
If you submit a pull request, please be sure to add or update corresponding
test cases, and ensure that npm test
continues to pass.