# xor-distance

> Calculate the distance between two buffers as a new buffer and compare computed distances with eachother

Latest version **2.0.0** (published 2019-02-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install xor-distance
pnpm add xor-distance
yarn add xor-distance
bun add xor-distance
```

## 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 | 2.0.0 |
| Published | 2019-02-04 |
| First published | 2015-09-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 38 |
| Author | Mathias Buus |
| Maintainers | mafintosh |

## Links

- npm: https://www.npmjs.com/package/xor-distance
- Repository: https://github.com/mafintosh/xor-distance
- Issues: https://github.com/mafintosh/xor-distance/issues
- npm.io page: https://npm.io/package/xor-distance

## Recent versions

- 2.0.0 (latest) — 2019-02-04
- 1.0.0 — 2015-09-27

## README

# xor-distance

Calculate the xor distance between two buffers as a new buffer and compare computed distances with eachother

```
npm install xor-distance
```

[![build status](http://img.shields.io/travis/mafintosh/xor-distance.svg?style=flat)](http://travis-ci.org/mafintosh/xor-distance)

## Usage

``` js
var distance = require('./')

var dist1 = distance(new Buffer('foo'), new Buffer('bar'))
var dist2 = distance(new Buffer('foo'), new Buffer('baz'))

// the following returns true since the distance between foo and bar
// is greater than the distance between foo and baz
console.log(distance.gt(dist1, dist2))
```

## License

MIT

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