Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/hex/src/lib/data/deps.ts>mongo.Bson.calculateObjectSize

An ecosystem delivering practices, philosophy and portability. Powered By Deno and JavaScript.
Latest
function mongo.Bson.calculateObjectSize
import { mongo } from "https://deno.land/x/hex@0.6.5/src/lib/data/deps.ts";
const { calculateObjectSize } = mongo.Bson;

Calculate the bson size for a passed in Javascript object.

Parameters

object: Document
  • the Javascript object to calculate the BSON byte size for
optional
options: CalculateObjectSizeOptions = [UNSUPPORTED]

Returns

number

size of BSON object in bytes