# searchesmun

> Search algorithm functions

Latest version **1.2.0** (published 2016-06-28) · MIT license · 0 weekly downloads

## Install

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

## 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.2.0 |
| Published | 2016-06-28 |
| First published | 2016-06-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Frank Martin |
| Maintainers | efarem |
| Keywords | search, algorithms |

## Links

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

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 1.2.0 (latest) — 2016-06-28
- 1.1.0 — 2016-06-22
- 1.0.0 — 2016-06-22

## README

# Searchesmun

[![Travis Build](https://img.shields.io/travis/efarem/searchesmun.svg?style=flat-square)](https://travis-ci.org/efarem/searchesmun)
[![Codecov coverage](https://img.shields.io/codecov/c/github/efarem/searchesmun.svg?style=flat-square)]()
[![NPM Version](https://img.shields.io/npm/v/searchesmun.svg?style=flat-square)](https://www.npmjs.com/package/searchesmun)

A JavaScript library for all of your favorite search algorithms.

### Currently supports
- Binary Search

### Installation
`npm install --save searchesmun`

### Usage

The search function requires a `compare` callback function which needs to
return one of `-1`, `0` or `1`.

- Return `-1` If the value being searched for is less than the current value being compared.
- Return `0` If the value being searched for is equal to the current value being compared.
- Return `-1` If the value being searched for is more than the current value being compared.

````
var search = require('searchesmun');

var items = [1,4,8,19,29];

search.binary(19, items, function (x, y) {
  if (x > y) {
    return 1;
  } else if (x < y) {
    return -1;
  }
  return 0;
});
````

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