datalayer

0.2.1 • Public • Published

Data layer

Synch data layer with types and events.

  • add(type, object)
  • remove(type, id)
  • update(type, id, attributes)
  • find(type, id)
  • findAll([type])

This uses CommonJS modules so use with browserify or Node.js

var datalayer = require('datalayer');
var dal = datalayer();
 
dal.add('product', { name: 'snowboard' });
dal.remove('product', 'uuid');
dal.update('product', 'uuid', { name: 'skateboard' });
 
dal.find('product', 'uuid');
 
dal.findAll();
dal.findAll('product');

Tests

mocha -r should specs

Readme

Keywords

none

Package Sidebar

Install

npm i datalayer

Weekly Downloads

2

Version

0.2.1

License

MIT

Last publish

Collaborators

  • enome