Skip to main content
Module

x/denodb/deps.ts>Bson.calculateObjectSize

MySQL, SQLite, MariaDB, PostgreSQL and MongoDB ORM for Deno
Go to Latest
function Bson.calculateObjectSize
import { Bson } from "https://deno.land/x/denodb@v1.0.40/deps.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

Returns

number

size of BSON object in bytes