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
npm i mongooseodm-uuid
npm run test
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,
});
👤 Max (https://github.com/gmax9803) ([email protected])
- Website: https://fourthfruit.com (currently down)
- Store: https://cpukeychains.com (Buy some CPUKeychains!)
- Github: @gmax9803
Contributions, issues and feature requests are welcome!
Feel free to check issues page. You can also take a look at the contributing guide.
Give a ⭐️ if this project helped you!
Copyright © 2020 Max (https://github.com/gmax9803) ([email protected]).
This project is ISC licensed.
This README was generated with ❤️ by readme-md-generator