# chai-match

> Advanced RegExp assertions for Chai.js

Latest version **1.1.1** (published 2015-11-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install chai-match
pnpm add chai-match
yarn add chai-match
bun add chai-match
```

## 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.1.1 |
| Published | 2015-11-12 |
| First published | 2015-05-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | John Wright |
| Maintainers | johngeorgewright |
| Keywords | chai-plugin, browser, string |

## Links

- npm: https://www.npmjs.com/package/chai-match
- Repository: https://github.com/johngeorgewright/chai-match
- Homepage: https://github.com/johngeorgewright/chai-match#readme
- Issues: https://github.com/johngeorgewright/chai-match/issues
- npm.io page: https://npm.io/package/chai-match

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.1.1 (latest) — 2015-11-12
- 1.1.0 — 2015-05-22
- 1.0.1 — 2015-05-22
- 1.0.0 — 2015-05-22

## README

Chai Match
==========

Advanced RegExp assertions for Chai.js.

Installation
------------

```
npm i --save-dev chai-match
```

```javascript
var chai = require('chai');
chai.use(require('chai-match'));
```

API
---

### `.capture(n)`

Sets the assertion object to a previous match's capture.

```javascript
expect('some thing to test').to.match(/some (\w+) to test/).and.capture(0).equals('thing');
'Here in London'.should.match(/(here|there) in (\w+)/i).and.capture(1).equals('London');
```

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