# diff-list

> Compare two arrays of objects and return a list of transformations

Latest version **1.0.3** (published 2016-01-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install diff-list
pnpm add diff-list
yarn add diff-list
bun add diff-list
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2016-01-14 |
| First published | 2015-03-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Jérémy Lal |
| Maintainers | kapouer |
| Keywords | diff, compare, transform |

## Links

- npm: https://www.npmjs.com/package/diff-list
- Repository: https://github.com/edasarl/node-diff-list
- Issues: https://github.com/edasarl/node-diff-list/issues
- npm.io page: https://npm.io/package/diff-list

## Dependencies (1)

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

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.3 (latest) — 2016-01-14
- 1.0.2 — 2016-01-11
- 1.0.1 — 2015-03-11
- 1.0.0 — 2015-03-10

## README

diff-list -- Compare two arrays of objects and return a list of transformations
===============================================================================


Usage
-----

```
var diff = require('diff-list');

var transforms = diff(srcRows, dstRows, {key: 'id'});
```
returns `{put: [..], post: [..], del: [..]}`
transformations needed to be applied to src to obtain dst,
not taking into account ordering.


Options
-------

* equal  
  function of two parameters that returns true if they are equal,  
  defaults to strict deep-equal.
* key  
  check if an item having that key already exists (put) or is new (post).

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