Skip to main content
Module

x/mongo/mod.ts>Bson.Code

MongoDB driver for Deno
Extremely Popular
Go to Latest
class Bson.Code
Re-export
import { Bson } from "https://deno.land/x/mongo@v0.31.0/mod.ts";
const { Code } = Bson;

A class representation of the BSON Code type.

Constructors

new
Code(code: string | Function, scope?: Document)

Properties

_bsontype: string
code: string | Function
optional
scope: Document

Methods

deprecated
toExtendedJSON(): CodeExtended
toJSON(): { code: string | Function; scope?: Document; }

Static Methods

deprecated
fromExtendedJSON(doc: CodeExtended): Code