Simple Globals implementation, inspired by Mumps Globals


Simple Globals implementation, inspired by Mumps Globals.

Via npm on Node:

npm install simpleglobals

Reference in your program:

var simpleglobals = require('simpleglobals');

Create a database:

var db = simpleglobals.createDatabase();

Get a node:

var customer = db.node('customers', 1234);

Set and get a value:

db.node('customers', 1234, 'name').value('Adam');
var name = db.node('customers', 1234, 'name').value();

Alternatively, you can use a node:

var adam = db.node('customers', 1234);
var name = adam.node('name').value();

A node can be converted to a plain JavaScript object:

db.node('customers', 1234, 'name').value('Adam');
db.node('customers', 1234, 'age').value(800);
var obj = db.node('customers', 1234).toObject();
// obj is { name : 'Adam', age: 800 } 

A node can be defined from a plain JavaScript object:

db.node('customers', 1235).fromObject( { name: 'Eve', age: 700 });
git clone git://
cd SimpleGlobals
npm install
npm test


  • 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.

This module was inspired by the discussion Healthcare needs the help of the Node.js Community at Node.js mailing list, triggered by @rtweed.

  • 0.0.1: Published.

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.