# libnpmdiff
[](https://npm.im/libnpmdiff)
[](https://npm.im/libnpmdiff)
[](https://github.com/npm/cli/actions/workflows/ci-libnpmdiff.yml)
The registry diff lib.
## Table of Contents
* [Example](#example)
* [Install](#install)
* [Contributing](#contributing)
* [API](#api)
* [LICENSE](#license)
## Example
```js
const libdiff = require('libnpmdiff')
const patch = await libdiff([
'abbrev@1.1.0',
'abbrev@1.1.1'
])
console.log(
patch
)
```
Returns:
```patch
diff --git a/package.json b/package.json
index v1.1.0..v1.1.1 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "abbrev",
- "version": "1.1.0",
+ "version": "1.1.1",
"description": "Like ruby's abbrev module, but in js",
"author": "Isaac Z. Schlueter ",
"main": "abbrev.js",
```
## Install
`$ npm install libnpmdiff`
### Contributing
The npm team enthusiastically welcomes contributions and project participation!
There's a bunch of things you can do if you want to contribute! The
[Contributor Guide](https://github.com/npm/cli/blob/latest/CONTRIBUTING.md)
outlines the process for community interaction and contribution. Please don't
hesitate to jump in if you'd like to, or even ask us questions if something
isn't clear.
All participants and maintainers in this project are expected to follow the
[npm Code of Conduct](https://docs.npmjs.com/policies/conduct), and just
generally be excellent to each other.
Please refer to the [Changelog](CHANGELOG.md) for project history details, too.
Happy hacking!
### API
#### `> libnpmdif([ a, b ], [opts]) -> Promise