Skip to content

Latest commit

 

History

History
35 lines (26 loc) · 802 Bytes

README.md

File metadata and controls

35 lines (26 loc) · 802 Bytes

hadron-document

Hadron Document is a wrapper for javascript objects that represent documents in a database intended for use with React components. It provides element (key/value pair) level dirty tracking with the ability to add, edit, delete and revert changes to elements directly.

Installation

npm install --save hadron-document

Usage

'use strict';

const { Document } = require('hadron-document');

var object = {
  _id: 'aphex-twin',
  name: 'Aphex Twin',
  locations: ['London'],
  emails: {
    home: '[email protected]',
    work: '[email protected]',
  },
};

var doc = new Document(object);