A suite of packages that has been designed to help you build express-powered web applications.
Installations
npm install joi-mongodb-oid
Developer Guide
Typescript
Yes
Module System
CommonJS, ESM
Node Version
16.17.0
NPM Version
8.1.2
Score
57.5
Supply Chain
84.4
Quality
75.2
Maintenance
100
Vulnerability
99.6
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
TypeScript (68.13%)
JavaScript (31.87%)
validate.email 🚀
Verify real, reachable, and deliverable emails with instant MX records, SMTP checks, and disposable email detection.
Developer
paulsmithkc
Download Statistics
Total Downloads
665
Last Day
1
Last Week
2
Last Month
26
Last Year
119
GitHub Statistics
MIT License
1 Stars
60 Commits
1 Watchers
1 Branches
1 Contributors
Updated on Nov 25, 2024
Bundle Size
968.00 B
Minified
514.00 B
Minified + Gzipped
Package Meta Information
Latest Version
2.0.6
Package Id
joi-mongodb-oid@2.0.6
Unpacked Size
6.13 kB
Size
2.42 kB
File Count
6
NPM Version
8.1.2
Node Version
16.17.0
Published on
Apr 22, 2023
Total Downloads
Cumulative downloads
Total Downloads
665
Dev Dependencies
4
joi-mongodb-oid
Custom Joi validator for MongoDB ObjectId.
Install
1npm install joi-mongodb-oid
CommonJS Usage
In your application's entry point (index.js/server.js/app.js):
1const Joi = require('joi-mongodb-oid')();
Then the objectId()
validator can be used just like any other Joi validator:
1const schema = Joi.object({
2 _id: Joi.objectId(),
3 name: Joi.string(),
4 date: Joi.date(),
5});
ESM Usage
In your application's entry point (index.js/server.js/app.js):
1import JoiMongoDB from 'joi-mongodb-oid'; 2const Joi = JoiMongoDB();
Then the objectId()
validator can be used just like any other Joi validator:
1const schema = Joi.object({
2 _id: Joi.objectId(),
3 name: Joi.string(),
4 date: Joi.date(),
5});
TS Usage
Inject the objectId validator:
1import JoiMongoDB from 'joi-mongodb-oid'; 2const Joi = JoiMongoDB();
Then the objectId()
validator can be used just like any other Joi validator:
1const schema = Joi.object({
2 _id: Joi.objectId(),
3 name: Joi.string(),
4 date: Joi.date(),
5});
Similar Packages

No vulnerabilities found.

No security vulnerabilities found.