# mongoose-regexp

> Adds RegExp storage support to Mongoose

Latest version **0.0.1** (published 2013-02-22) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

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

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2013-02-22 |
| First published | 2013-02-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 14 |
| Author | Aaron Heckmann |
| Maintainers | aaron |
| Keywords | mongoose, type, schema, schematype |

## Links

- npm: https://www.npmjs.com/package/mongoose-regexp
- Repository: https://github.com/aheckmann/mongoose-regexp
- npm.io page: https://npm.io/package/mongoose-regexp

## Alternatives

- [angular-pipes](https://npm.io/package/angular-pipes.md) — 5.6K weekly downloads
- [@ng-web-apis/midi](https://npm.io/package/@ng-web-apis/midi.md) — 2.6K weekly downloads
- [happn-3](https://npm.io/package/happn-3.md) — 1.6K weekly downloads
- [@opensip-cli/lang-go](https://npm.io/package/@opensip-cli/lang-go.md) — 1.2K weekly downloads
- [mongoose-typescript](https://npm.io/package/mongoose-typescript.md) — 85 weekly downloads

## Recent versions

- 0.0.1 (latest) — 2013-02-22

## README

#mongoose-regexp
=================

Provides [Mongoose](http://mongoosejs.com) support for storing `RegExp`.

[![Build Status](https://secure.travis-ci.org/aheckmann/mongoose-regexp.png?branch=master)](http://travis-ci.org/aheckmann/mongoose-regexp)

Example:

```js
var mongoose = require('mongoose')
require('mongoose-regexp')(mongoose);

var mySchema = Schema({ reg: RegExp });
var M = mongoose.model('RegExp', mySchema);

var m = new M;
m.reg = /^mongodb/i;
m.save(function (err) {
  M.findById(m._id, function (err, doc) {
    var ok = m.reg.test("MongoDB allows storing RegExps!");
    console.log(ok); // true
  });
});
```

### install

```
npm install mongoose-regexp
```

[LICENSE](https://github.com/aheckmann/mongoose-regexp/blob/master/LICENSE)

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