# trimerge

> three way merge JSON and arbitrary structures

Latest version **1.3.0-alpha.15** (published 2021-05-10) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.0-alpha.15 |
| Published | 2021-05-10 |
| First published | 2019-06-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=6 |
| Dependencies | 0 |
| Unpacked size | 229.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 24 |
| Author | Marcello Bastéa-Forte |
| Maintainers | marcello |
| Keywords | json, three-way-merge, diff, diff3, merge |

## Links

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

## 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

- 1.3.0-alpha.15 (latest) — 2021-05-10
- 0.0.0-21d0663 (canary) — 2019-10-25
- 1.3.0-alpha.14 — 2020-04-02
- 1.3.0-alpha.13 — 2019-10-25
- 0.0.0-757ea26 — 2019-10-25
- 1.3.0-alpha.11 — 2019-08-08
- 1.3.0-alpha.10 — 2019-08-08
- 1.3.0-alpha.9 — 2019-08-05
- 1.3.0-alpha.8 — 2019-08-01
- 1.3.0-alpha.7 — 2019-07-22
- 1.3.0-alpha.6 — 2019-07-15
- 1.3.0-alpha.5 — 2019-07-12
- 1.3.0-alpha.4 — 2019-06-22
- 1.3.0-alpha.3 — 2019-06-22
- 1.3.0-alpha.2 — 2019-06-17
- … 3 more at https://npm.io/package/trimerge/versions

## README

# Trimerge: Three-way Merge JSON and Structures

[![Actions Status](https://github.com/marcello3d/trimerge/workflows/Node%20CI/badge.svg)](https://github.com/marcello3d/trimerge/actions)
[![npm version](https://badge.fury.io/js/trimerge.svg)](https://badge.fury.io/js/trimerge)
[![codecov](https://codecov.io/gh/marcello3d/trimerge/branch/master/graph/badge.svg)](https://codecov.io/gh/marcello3d/trimerge)

Experimental 3-way merge library.

Usage:

```typescript
import { combineMergers, trimergeEquality, trimergeJsonObject } from 'trimerge';

const s1 = { hello: 1, world: 2 };
const s2 = { hello: 1, world: 2, there: 2 };
const s3 = { hello: 1 };

const merger = combineMergers(trimergeEquality, trimergeJsonObject);
merger(s1, s2, s3); // => { hello: 1, there: 2 }
```

## License

Based on MIT licensed code from [node-diff3](https://github.com/bhousel/node-diff3).

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