# regexp-factorize

> convert quadratic to logarithmic array of "OR" strings

Latest version **1.0.1** (published 2022-01-21) · ISC license · 0 weekly downloads

## Install

```sh
npm install regexp-factorize
pnpm add regexp-factorize
yarn add regexp-factorize
bun add regexp-factorize
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2022-01-21 |
| First published | 2022-01-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Nicolas Pelletier |
| Maintainers | nico |
| Keywords | regexp, regex, factorize, logarithmic |

## Links

- npm: https://www.npmjs.com/package/regexp-factorize
- Repository: https://github.com/apiculteur/regexp-factorize
- Issues: https://github.com/apiculteur/regexp-factorize/issues
- npm.io page: https://npm.io/package/regexp-factorize

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 1.0.1 (latest) — 2022-01-21
- 1.0.0 — 2022-01-21

## README

# Regexp Factorize

## install
`npm i regexp-factorize`

## Sample
```javascript
import { factorizeOr } from 'regexp-factorize';

const keywords = ['ant', 'antelope', 'albatross', 'alligator'];
const regexpString = factorizeOr(keywords); // a(?:nt(?:|elope)|l(?:batross|ligator))
const regexp = new RegExp(regexpString);

const document = "There's an alligator in my house";

console.log(regexp.test(document)); // true
```

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