# like-to-regexp

> Convert sql like query to regexp

Latest version **0.0.3** (published 2018-11-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install like-to-regexp
pnpm add like-to-regexp
yarn add like-to-regexp
bun add like-to-regexp
```

## 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.3 |
| Published | 2018-11-09 |
| First published | 2018-10-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 143.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Igor ESCHALIER |
| Maintainers | ieschalier |
| Keywords | sql, like, regexp, convert, light |

## Links

- npm: https://www.npmjs.com/package/like-to-regexp
- Repository: https://github.com/ieschalier/like-to-regexp
- Homepage: https://github.com/ieschalier/like-to-regexp#readme
- Issues: https://github.com/ieschalier/like-to-regexp/issues
- npm.io page: https://npm.io/package/like-to-regexp

## Alternatives

- [@oh-my-pi/pi-natives](https://npm.io/package/@oh-my-pi/pi-natives.md) — 51.8K weekly downloads
- [@capgo/capacitor-light-sensor](https://npm.io/package/@capgo/capacitor-light-sensor.md) — 3.0K weekly downloads
- [@heyhuynhgiabuu/pi-diff](https://npm.io/package/@heyhuynhgiabuu/pi-diff.md) — 492 weekly downloads
- [@lotsa/verdant-lang-asm](https://npm.io/package/@lotsa/verdant-lang-asm.md) — 38 weekly downloads
- [new-era-syntax](https://npm.io/package/new-era-syntax.md) — 20 weekly downloads

## Recent versions

- 0.0.3 (latest) — 2018-11-09
- 0.0.2 — 2018-10-31
- 0.0.1 — 2018-10-31

## README

# like-to-regexp

Transform sql like query to a valide regexp.

| SQL LIKE |  ReGexp         |
|----------|-----------------|
|  value   |  /^value$/i     |
|  %value% | /^.*value.*$/i  |
|  value%  | /^value.*$/i    |
|  %value  | /^.*value$/i    |
|  v_lue   | /^v.lue$/i      |

## Install

```bash
yarn add like-to-regexp
```

## Usage

```javascript
import toReGexp from 'like-to-regexp'

const regexp = toReGexp('%value%')

if (regexp.test('value')) console.log('Hello world')
```

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