# slugify-mongoose

> Generate a unique slug for mongoose

Latest version **1.0.2** (published 2017-06-01) · MIT license · 0 weekly downloads

## Install

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

## 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.2 |
| Published | 2017-06-01 |
| First published | 2017-04-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 7.4.0 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Miguel Dorta |
| Maintainers | ellipticaldoor |
| Keywords | mongoose, mongodb, slug, slugify, feathers, feathersjs, keystone |

## Links

- npm: https://www.npmjs.com/package/slugify-mongoose
- Repository: https://github.com/ellipticaldoor/slugify-mongoose
- Homepage: https://github.com/ellipticaldoor/slugify-mongoose#readme
- Issues: https://github.com/ellipticaldoor/slugify-mongoose/issues
- npm.io page: https://npm.io/package/slugify-mongoose

## Dependencies (1)

- [slug](https://npm.io/package/slug.md) ^0.9.1

## 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

- 1.0.2 (latest) — 2017-06-01
- 1.0.1 — 2017-05-29
- 1.0.0 — 2017-04-10

## README

# slugify-mongoose
Generate a unique slug for mongoose.


## Installation
```
npm i --save slugify-mongoose
```

## Usage
``` js
const slugify = require('slugify-mongoose')

const mongoose = require('mongoose')
const Schema = mongoose.Schema

const mySchema = new Schema({
	title: { type: String },
	slug: { type: String, slug: 'title', unique: true },
})

mySchema.plugin(slugify)
```

## Info
There are currently a lot of plugins for mongoose that already generate slugs,
I made this because none of them worked with the web framework [feathers](https://feathersjs.com/).

This plugin also works with [keystone](http://keystonejs.com/).

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