Skip to main content
Latest
class DynamoDBNumberValue
import { DynamoDBNumberValue } from "https://deno.land/x/dynamodb@v1.0.0/util.ts";

An object recognizable as a numeric value that stores the underlying number as a string.

Intended to be a deserialization target for the DynamoDB Doc Client when the wrapNumbers flag is set. This allows for numeric values that lose precision when converted to JavaScript's number type.

Constructors

new
DynamoDBNumberValue(value: number | string)

Creates a dynamodb number value.

Properties

readonly
value: string
readonly
wrapperName: string

Methods

toJSON(): number

Renders the underlying value as a number when converting to JSON.

toNumber(): number

Converts the underlying value to a JavaScript number.

toString(): string

Returns a decimal string representing the number value.