import { EJSON } from "https://dotland.deno.dev/x/atlas_sdk3@v0.3.1/mod.ts";
const { stringify } = EJSON;
Converts a BSON document to an Extended JSON string, optionally replacing values if a replacer function is specified or optionally including only the specified properties if a replacer array is specified.
Parameters
optional
replacer: (number | string)[] | ((this: any,
key: string,
value: any,
- A function that alters the behavior of the stringification process, or an array of String and Number objects that serve as a whitelist for selecting/filtering the properties of the value object to be included in the JSON string. If this value is null or not provided, all properties of the object are included in the resulting JSON string