Node's Package Magician

npm

Need private packages and team management tools?Check out npm Orgs. »

memlively

0.0.2 • Public • Published

memlively

Pure memory implementation of LivelyDb for doing real-time data binding of a database with local javascript objects.

Just one of multiple database implementations for the livedb real-time data-binding framework for replicating databases to local javascript objects.

build status

Installation

This module is installed via npm:

$ npm install memlively

Example Usage

var MemLively = require('memlively');
 
// Write to the memory database
var memdb = new MemLively();
memdb.put('my key', 'my value, function (err) {
  // I/O or other error, pass it up the callback chain
  if (err) return callback(err);
});
 
// Read from the memory database
memdb.get('my key', function (err, value) {
  if (err) {
    if (err.notFound) {
      // handle not found error
      return;
    } else {
      // I/O or other error, pass it up the callback chain
      return callback(err);
    }
  }
});
 
// Delete from the memory database
memdb.del('my key', function (err) {
  // I/O or other error, pass it up the callback chain
  if (err) return callback(err);
});

Keywords

none

install

npm i memlively

Downloadsweekly downloads

0

version

0.0.2

license

none

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability