1.1.8 ā€¢ Published 4 years ago

mongooseodm-uuid v1.1.8

Weekly downloads
8
License
MPL-2.0
Repository
github
Last release
4 years ago

A Custom Mongoose UUID SchemaType, to use for MongoDB Binary UUIDs (Subtype 0x03 and 0x04) (Subtype 0x03 follows the Java Driver implementation.)

Please note that inserting subtype 0x03 Binary UUIDs to the db is currently not supported

šŸ  Homepage

Install

npm i mongooseodm-uuid

Run tests

npm run test

Usage

1) Register the SchemaType (insert somewhere like your index.js):

require('mongooseodm-uuid');

2) Use the SchemaType in a Mongoose Schema

const mongoose = require("mongoose");
const {MUUID} = require('mongooseodm-uuid');

const Schema = mongoose.Schema;

const HavocPunishmentSchema = new Schema({
    uuid: MUUID,
});

OR

const mongoose = require("mongoose");
const {MUUID} = require('mongooseodm-uuid');

const Schema = mongoose.Schema;

const HavocPunishmentSchema = new Schema({
    uuid: mongoose.Types.MUUID,
});

Author

šŸ‘¤ Max (https://github.com/gmax9803) (gmax@fourthfruit.com)

šŸ¤ Contributing

Contributions, issues and feature requests are welcome!Feel free to check [issues page](https://github.com/gmax9803/mongoose-uuid/issues). You can also take a look at the [contributing guide](https://github.com/gmax9803/mongoose-uuid/blob/master/CONTRIBUTING.md).

Show your support

Give a ā­ļø if this project helped you!

šŸ“ License

Copyright Ā© 2020 [Max (https://github.com/gmax9803) (gmax@fourthfruit.com)](https://github.com/gmax9803). This project is [ISC](https://github.com/gmax9803/mongoose-uuid/blob/master/LICENSE) licensed.


This README was generated with ā¤ļø by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)

1.1.8

4 years ago

1.1.7

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago