Skip to content

Files

hadron-document

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Mar 27, 2025
Jul 23, 2024
May 8, 2024
Apr 11, 2022
Jun 15, 2021
Apr 24, 2024
Apr 11, 2022
Apr 24, 2024
Jan 28, 2020
Apr 11, 2022
Apr 10, 2025
Apr 11, 2022
Apr 11, 2022

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: 'home@aphextwin.com',
    work: 'work@aphextwin.com',
  },
};

var doc = new Document(object);