# asearch

> Approximate pattern matching

Latest version **1.0.1** (published 2021-05-23) · BSD-2-Clause license · 0 weekly downloads

## Install

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

## 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.1 |
| Published | 2021-05-23 |
| First published | 2013-12-11 |
| Weekly downloads | 0 |
| License | BSD-2-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 29 |
| Author | Sho Hashimoto |
| Maintainers | shokai |
| Keywords | ambiguity, text, search |

## Links

- npm: https://www.npmjs.com/package/asearch
- Repository: https://github.com/shokai/node-asearch
- Issues: https://github.com/shokai/node-asearch/issues
- npm.io page: https://npm.io/package/asearch

## Alternatives

- [random-seedable](https://npm.io/package/random-seedable.md) — 27.9K weekly downloads
- [n2words](https://npm.io/package/n2words.md) — 22.2K weekly downloads
- [@stdlib/math-base-special-factorialln](https://npm.io/package/@stdlib/math-base-special-factorialln.md) — 5.7K weekly downloads
- [@stdlib/math-base-special-abs2](https://npm.io/package/@stdlib/math-base-special-abs2.md) — 1.7K weekly downloads
- [commons-math-interpolation](https://npm.io/package/commons-math-interpolation.md) — 1.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2021-05-23
- 1.0.0 — 2021-05-23
- 0.0.7 — 2014-01-31
- 0.0.6 — 2013-12-13
- 0.0.5 — 2013-12-12
- 0.0.4 — 2013-12-12
- 0.0.3 — 2013-12-11
- 0.0.2 — 2013-12-11
- 0.0.1 — 2013-12-11

## README

# Node Asearch
Approximate pattern matching on JavaScript

- https://github.com/shokai/node-asearch
- https://npmjs.org/package/asearch


## Install

    $ npm install asearch

## Usage

```js
const Asearch = require('asearch')

const match = Asearch('abcde')

console.log(match('abcde'))    // => true
console.log(match('AbCdE'))    // => true
console.log(match('abcd'))     // => false
console.log(match('abcd', 1))  // => true
console.log(match('ab de', 1)) // => true
console.log(match('abe', 1))   // => false
console.log(a.match('abe', 2))   // => true
```

### Typo

```js
const match = Asearch('cheese burger')

console.log(match('cheese burger'))   // => true
console.log(match('chess burger'))    // => false
console.log(match('chess burger', 2)) // => true
console.log(match('chess', 2))        // => false
```

<img src="http://gyazo.com/cbbabaf5f48f99a236b129b3df804081.png">


### 2 byte chars

```js
const match = Asearch('漢字文字列')

console.log(match('漢字文字列'))    // => true
console.log(match('漢字の文字列'))  // => false
console.log(match('漢字の文字列', 1)) // => true
```


## Test

    $ git clone https://github.com/shokai/node-asearch.git
    $ cd node-asearch
    $ npm i
    $ npm test

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