Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/hex/src/data/deps.ts>mongo.Code

An ecosystem delivering practices, philosophy and portability.
Go to Latest
class mongo.Code
Re-export
import { mongo } from "https://deno.land/x/hex@0.5.15/src/data/deps.ts";
const { Code } = mongo;

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