Skip to main content
Module

x/atlas_sdk/mod.ts>calculateObjectSize

TypeSafe MongoDB Atlas Data API SDK for Deno & Deno Deploy
Go to Latest
function calculateObjectSize
import { calculateObjectSize } from "https://deno.land/x/atlas_sdk@v1.0.2/mod.ts";

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