Skip to main content
Module

x/atlas_sdk/mod.ts>calculateObjectSize

TypeSafe MongoDB Atlas Data API SDK for Deno, Deno Deploy and Node.js
Latest
function calculateObjectSize
import { calculateObjectSize } from "https://deno.land/x/atlas_sdk@v1.1.3/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

Returns

number

size of BSON object in bytes