# mongodbext-shortid-plugin

> mongodbext shortid plugin

Latest version **1.0.0** (published 2016-03-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install mongodbext-shortid-plugin
pnpm add mongodbext-shortid-plugin
yarn add mongodbext-shortid-plugin
bun add mongodbext-shortid-plugin
```

## 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.0 |
| Published | 2016-03-04 |
| First published | 2016-03-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Aleksey Timchenko |
| Maintainers | fleg |
| Keywords | mongodb, mongodbext, shortid |

## Links

- npm: https://www.npmjs.com/package/mongodbext-shortid-plugin
- Repository: https://github.com/fleg/mongodbext-shortid-plugin
- Homepage: https://github.com/fleg/mongodbext-shortid-plugin#readme
- Issues: https://github.com/fleg/mongodbext-shortid-plugin/issues
- npm.io page: https://npm.io/package/mongodbext-shortid-plugin

## Dependencies (1)

- [shortid](https://npm.io/package/shortid.md) 2.2.4

## 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.0 (latest) — 2016-03-04

## README

# mongodbext-shortid-plugin
[![Build Status](https://travis-ci.org/fleg/mongodbext-shortid-plugin.svg?branch=master)](https://travis-ci.org/fleg/mongodbext-shortid-plugin)
[![Coverage Status](https://coveralls.io/repos/fleg/mongodbext-shortid-plugin/badge.svg?branch=master&service=github)](https://coveralls.io/github/fleg/mongodbext-shortid-plugin?branch=master)

[mongodbext](https://github.com/2do2go/mongodbext) [shortid](https://github.com/dylang/shortid) plugin

### Plugin parameters
- `seed` - pass to `shortid.seed`
- `characters` - pass to `shortid.characters`
- `worker` - pass to `shortid.worker`
- `duplicateRetries` - set count of retries to generate unique `_id`, default value: `5`

### Example
```javascript
var MongoClient = require('mongodb').MongoClient,
    Collection = require('mongodbext').Collection,
    shortid = require('shortid'),
    expect = require('expect.js'),
    shortidPlugin = require('mongodbext-shortid-plugin');

MongoClient.connect('mongodb://localhost:27017/test', function(err, db) {
    var collection = new Collection(db, 'shortidExample');

    collection.addPlugin(shortidPlugin);
    collection.insertOne({foo: 'bar'}, function(err, doc) {
        expect(shortid.isValid(doc._id)).to.be.ok();
    });
});
```

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