# scuttle-patch

> A JSON-Patch backed scuttlebutt that supports replicating arbitrary JSON objects.

Latest version **0.1.0** (published 2015-01-04) · ISC license · 0 weekly downloads

## Install

```sh
npm install scuttle-patch
pnpm add scuttle-patch
yarn add scuttle-patch
bun add scuttle-patch
```

## 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.1.0 |
| Published | 2015-01-04 |
| First published | 2015-01-04 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Allain Lalonde |
| Maintainers | allain |
| Keywords | scuttlebutt json-patch json |

## Links

- npm: https://www.npmjs.com/package/scuttle-patch
- Repository: https://github.com/allain/scuttle-patch
- Issues: https://github.com/allain/scuttle-patch/issues
- npm.io page: https://npm.io/package/scuttle-patch

## Dependencies (3)

- [jiff](https://npm.io/package/jiff.md) ^0.7.0
- [debug](https://npm.io/package/debug.md) ^2.1.1
- [scuttlebutt](https://npm.io/package/scuttlebutt.md) ^5.6.10

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 0.1.0 (latest) — 2015-01-04

## README

# scuttle-patch

A JSON-Patch backed scuttlebutt that supports replicating arbitrary JSON objects.

[![build status](https://secure.travis-ci.org/allain/scuttle-patch.png)](http://travis-ci.org/allain/scuttle-patch)

## Installation

This module is installed via npm:

``` bash
$ npm install scuttle-patch
```

## Example Usage

``` js
var ScuttlePatch = require('scuttle-patch');

var model = new ScuttlePatch();
model.on('change', function(updatedDoc) {
  console.log(JSON.stringify(updatedDoc));
});

model.update({a: 10, b: true, c:[2, 1]});
model.update({a: 10, c: [1, 2]});

model.patch([{op: 'add', path: '/d', value: 'Hello'}]);

console.log(model.toJSON());

//should output:
// {"a": 10, "c": [1, 2], "d": "Hello"}
```

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