Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Go to Latest
method ObjectId.isValid
import { ObjectId } from "https://deno.land/x/darkflare@v7.2.2/realm/mod.ts";

Checks if a value is a valid bson ObjectId

Parameters

id:
| string
| number
| ObjectIdLike
| Uint8Array
  • ObjectId instance to validate.

Returns

boolean