Preparing for system design interviews?  Try bugzed.com →

valid-objectid

JSON →
library 0.0.2 ·javascript maintenance
verified Jun 5, 2026

A minimal package to test whether a string is a valid MongoDB ObjectId representation. Version 0.0.2, no recent updates. It simply checks if the string is 24 hex characters. Unlike mongoose's isValid, which can accept Buffer, ObjectId, etc., this package expects a string argument. Limited to ES5/CJS, no TypeScript support, no ESM. A lightweight alternative to mongoose.Types.ObjectId.isValid for string-only validation.

total hits 15
actors 3 distinct systems
last hit 16d ago AhrefsBot
GPTBot
3
ByteDance
2
Humans
9

top countries 🇸🇬 Singapore · 🇺🇸 United States · 🇨🇦 Canada · VN