Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/hex/src/data/deps.ts>mongo.Bson.ObjectId.generate

An ecosystem delivering practices, philosophy and portability.
Go to Latest
method mongo.Bson.ObjectId.generate
Re-export
import { mongo } from "https://deno.land/x/hex@0.5.15/src/data/deps.ts";
const { ObjectId } = mongo.Bson;

Generate a 12 byte id buffer used in ObjectId's

Parameters

optional
time: number
  • pass in a second based timestamp.

Returns

Uint8Array