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

x/mongo/mod.ts>Bson.Long.fromNumber

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

Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned.

Parameters

value: number
  • The number in question
optional
unsigned: boolean
  • Whether unsigned or not, defaults to signed

Returns

Long

The corresponding Long value