import { BigNumber } from "bignumber.js" ; import { NULL_ADDRESS } from "./constants" ; export const isBigNumber = ( object ) => { return ( object . isBigNumber || object instanceof BigNumber || ( object . constructor && object . constructor . name === "BigNumber" ) ) ; } ; param { string } address returns { boolean } export const isNonNullAddress = ( address ) => { const addressRegex = new RegExp ( "^0x[a-fA-F0-9]{40}$" ) ; return address . match ( addressRegex ) && address !== NULL_ADDRESS ; } ;