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

x/mongo/mod.ts>Bson.Decimal128

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

A class representation of the BSON Decimal128 type.

Constructors

new
Decimal128(bytes: Uint8Array | string)

Properties

_bsontype: string
readonly
bytes: Uint8Array

Methods

toExtendedJSON(): Decimal128Extended
toJSON(): Decimal128Extended
toString(): string

Create a string representation of the raw Decimal128 value

Static Methods

fromExtendedJSON(doc: Decimal128Extended): Decimal128
fromString(representation: string): Decimal128

Create a Decimal128 instance from a string representation