Skip to main content
Module

x/atlas_sdk/mod.ts>Bson.calculateObjectSize

TypeSafe MongoDB Atlas Data API SDK for Deno & Deno Deploy
Go to Latest
function Bson.calculateObjectSize
import { Bson } from "https://deno.land/x/atlas_sdk@v0.1.1/mod.ts";
const { calculateObjectSize } = 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