# @wholebuzz/binary-merge

> 2-way merge

Latest version **0.0.1** (published 2021-10-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install @wholebuzz/binary-merge
pnpm add @wholebuzz/binary-merge
yarn add @wholebuzz/binary-merge
bun add @wholebuzz/binary-merge
```

## 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.0.1 |
| Published | 2021-10-03 |
| First published | 2021-10-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Mikola Lysenko |
| Maintainers | jmfoutts |
| Keywords | binary, merge, sort, sorting, sorted, array, algorithm |

## Links

- npm: https://www.npmjs.com/package/@wholebuzz/binary-merge
- Repository: https://github.com/wholebuzz/binary-merge
- Homepage: https://github.com/wholebuzz/binary-merge#readme
- Issues: https://github.com/wholebuzz/binary-merge/issues
- npm.io page: https://npm.io/package/@wholebuzz/binary-merge

## Recent versions

- 0.0.1 (latest) — 2021-10-03

## README

binary-merge
============
[Merges a pair of sorted arrays.](http://en.wikipedia.org/wiki/Merge_algorithm)

Use
===
First install via npm:

    npm install binary-merge
    
Then you can use the algorithm as follows:


```javascript
var merge = require("binary-merge")


console.log(merge([1,3,7], [2,4,6]))

// Prints:
//
//    1,2,3,4,6,7
//
```

### `require("binary-merge")(a, b[, compare, result])`
The arguments are as follows:

* `a` a sorted array
* `b` again, a sorted array
* `compare` an optional comparison function
* `result` an optional array which gets the result of merging a and b.  If not specified, a new array is allocated.

**Returns:** A sorted array.

**Time Complexity:** `O(a.length + b.length)`

Credits
=======
(c) 2013 Mikola Lysenko. MIT License

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