Skip to main content
Module

x/web_bson/src/bson.ts>calculateObjectSize

web_bson is a fork from mongodb/js-bson
Very Popular
Go to Latest
function calculateObjectSize
import { calculateObjectSize } from "https://deno.land/x/web_bson@v0.2.4/src/bson.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