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

x/mongo/mod.ts>Bson.Long#compare

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

Compares this Long's value with the specified's.

Parameters

other:
| string
| number
| Long
| Timestamp

Returns

0 | 1 | -1

0 if they are the same, 1 if the this is greater and -1 if the given one is greater