@kikiutils/mongoose v3.1.1
@kikiutils/mongoose
A Mongoose plugin for enhanced JSON normalization and common schema creation, with built-in support for pagination and automatic Decimal128 conversion.
Features
- ✨ Flexible Connections: Supports both default and custom connections, automatically creating connections when none are provided
- 🔌 Plugin Integration: Automatically integrates
mongoose-aggregate-paginate-v2,mongoose-paginate-v2, and custom normalization for cleaner JSON outputs - 🛠 Predefined & Customizable Schemas: Provides common schemas (boolean, date, decimal128, number, objectId, string) with the flexibility to customize attributes such as
private,required,unique,default, and more - 🧮 Decimal Precision: Supports
Decimal128fields with options for automatic rounding and fixed decimal precision - 🔄 Optimized JSON Output: Adds an
idfield, removes_idand__v, hides private fields, and convertsDecimal128fields to strings in JSON responses - 🔄 Reference Management: Enables easy conversion of ObjectId references to fully populated documents with field selection and population options
- 🔧 Utility Functions: Includes helper functions for converting and normalizing documents, handling ObjectId transformations, and processing schema fields
Requirements
- Mongoose
>= 8 - Node.js
>= 18.12.1
Installation
Using pnpm:
pnpm add @kikiutils/mongoose mongooseYou can also use yarn, npm, or bun.
Usage
To be completed.
License
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
12 months ago
1 year ago
11 months ago
8 months ago
12 months ago
9 months ago
10 months ago
9 months ago
9 months ago
6 months ago
8 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago