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

x/web3/types/bignumber.d.ts>BigNumber#isNegative

Deno / TypeScript to Ethereum Connector
Latest
method BigNumber.prototype.isNegative
import { BigNumber } from "https://deno.land/x/web3@v0.11.1/types/bignumber.d.ts";

Returns true if the value of this BigNumber is negative, otherwise returns false.

x = new BigNumber(-0)
x.isNegative()                  // true
y = new BigNumber(2)
y.isNegative()                  // false

Returns

boolean