{"library":"valid-objectid","type":"library","category":null,"description":"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.","language":"javascript","status":"maintenance","version":"0.0.2","tags":["javascript","mongoose","ObjectId","_id","validation"],"last_verified":"Fri Jun 05","install":[{"cmd":"npm install valid-objectid","imports":["import { isValid } from 'valid-objectid'","const { isValid } = require('valid-objectid')","const isValid = require('valid-objectid').isValid;"]},{"cmd":"yarn add valid-objectid","imports":[]},{"cmd":"pnpm add valid-objectid","imports":[]}],"homepage":"https://github.com/cnkdynamics/valid-objectid#readme","github":"https://github.com/cnkdynamics/valid-objectid","docs":null,"changelog":null,"pypi":null,"npm":"valid-objectid","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}