# merlin-delta

> Merlin Delta =============

Latest version **0.0.0** (published 2014-09-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install merlin-delta
pnpm add merlin-delta
yarn add merlin-delta
bun add merlin-delta
```

## 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.0.0 |
| Published | 2014-09-08 |
| First published | 2014-09-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Robert Hurst |
| Maintainers | robertwhurst |

## Links

- npm: https://www.npmjs.com/package/merlin-delta
- npm.io page: https://npm.io/package/merlin-delta

## Dependencies (2)

- [clone](https://npm.io/package/clone.md) ^0.1.15
- [deep-equal](https://npm.io/package/deep-equal.md) ^0.2.1

## Recent versions

- 0.0.0 (latest) — 2014-09-08

## README

Merlin Delta
=============

Merlin Schema is a delta implementation
developed for the (soon to be released) Merlin ORM.

Designed as a standalone package to allow anyone
to create and apply deltas without needing an entire
ORM.

Use it with node or in the browser using
browserify.

```shell
npm install merlin-delta
```

[![NPM version](https://badge.fury.io/js/merlin-delta.png)](http://badge.fury.io/js/merlin-delta)

Example
-------
```javascript
var delta = require('merlin-delta');

// create an old version of a person record
var oldRecord = {
  name: {
    first: 'John',
    last: 'Doe'
  },
  born: new Date('Jan 23, 1981'),
  sex: 'M'
};

// create an new version of a person record
var newRecord = {
  name: {
    first: 'Johnny',
    last: 'Doe'
  },
  born: new Date('Jan 24, 1981'),
  sex: 'M'
};

// create a delta from the old and new copy of the record
var delta = delta.create(oldRecord, newRecord);

// lets look at the diff
delta.diff => {
  $set: {
    'name.first': 'Johnny',
    born: Sat Jan 24 1981 00:00:00 GMT-0800 (PST)
  }
};
```

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