# domma

> Keep your live and static documents in sync

Latest version **0.14.0** (published 2018-06-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install domma
pnpm add domma
yarn add domma
bun add domma
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.14.0 |
| Published | 2018-06-25 |
| First published | 2018-02-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 88.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Eugene Ford |
| Maintainers | eugeneford |
| Keywords | dom, document, iframe, mapper, mutations |

## Links

- npm: https://www.npmjs.com/package/domma
- Repository: https://github.com/eugeneford/domma
- Homepage: https://github.com/eugeneford/domma#readme
- Issues: https://github.com/eugeneford/domma/issues
- npm.io page: https://npm.io/package/domma

## Dependencies (1)

- [anodum](https://npm.io/package/anodum.md) ^1.1.2

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 0.14.0 (latest) — 2018-06-25
- 0.13.1 — 2018-06-19
- 0.13.0 — 2018-06-17
- 0.12.0 — 2018-06-10
- 0.11.0 — 2018-06-10
- 0.10.1 — 2018-06-07
- 0.10.0 — 2018-06-07
- 0.9.14 — 2018-06-05
- 0.9.13 — 2018-06-02
- 0.9.11 — 2018-05-30
- 0.9.10 — 2018-04-25
- 0.9.9 — 2018-04-25
- 0.9.8 — 2018-04-25
- 0.9.7 — 2018-04-24
- 0.9.6 — 2018-04-24
- … 6 more at https://npm.io/package/domma/versions

## README

<p align="center">
  <img src="https://raw.githubusercontent.com/eugeneford/domma/master/.github/domma-logo.png" width="100" height="100">
</p>

<h3 align="center">
  Domma
</h3>

<p align="center">
  Keep your live and static documents in sync
</p>

<p align="center">
  <a href="https://travis-ci.org/eugeneford/domma">
    <img src="https://travis-ci.org/eugeneford/domma.svg?branch=master" alt="Build Status">
  </a>
  <a href='https://coveralls.io/github/eugeneford/domma'>
    <img src='https://coveralls.io/repos/github/eugeneford/domma/badge.svg?v=0' alt='Coverage Status' />
  </a>
  <a href='https://www.npmjs.com/package/domma'>
    <img src='https://img.shields.io/npm/v/domma.svg?v=0' alt='NPM Version' />
  </a>
</p>

## Overview

## How to Install
```js
npm install --save domma
```

## Get Started
```js
import Domma from "domma";

// Get your own static document
const staticDocument = document.implementation.createHTMLDocument('');

// Create Domma instance
const domma = new Domma();

// Connect your static document to domma
domma.connectStaticDocument(staticDocument);

// Compose a "live" clone of your document 
domma.composeLiveDocument();

// Apply any dynamic changes that should not be synced with static DOM
const liveDocument = domma.getLiveDocument();
liveDocument.body.setAttribute('id', 'dynamic-id');

// Apply changes that should be synced with static DOM
domma.conductTransaction((liveDOM) => {
  liveDOM.body.innerHTML = 'hello world';
}).then(() => {
  const staticDOM = domma.getStaticDocument();
  const body = staticDOM.body;
  
  // Dynamic changes are not synced
  const id = body.getAttribute('id'); // id => undefined
  
  // Transaction changes are synced
  const html = body.innerHTML; // html => 'hello world'
});

```

## Contributing to Domma
Contributions are always welcome.
Before contributing please read the [code of conduct](https://js.foundation/community/code-of-conduct) &
[search the issue tracker](https://github.com/eugeneford/domma/issues) (your issue may have already been discussed or fixed).

To contribute, follow next steps:
* Fork Domma
* Commit your changes
* Open a Pull Request.

### Feature Requests
Feature requests should be submitted in the issue tracker, with a description
of the expected behavior & use case, where they'll remain closed until sufficient interest (e.g. :+1: reactions).
Before submitting a feature request, please search for similar ones in the closed issues.

## License
Released under the [MIT License](https://github.com/eugeneford/domma/blob/master/LICENSE)

---
_Source: https://npm.io/package/domma · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
