示例#1
0
        public override bool IsLooselyEqual(JsValue value)
        {
            if (value is JsString jsString)
            {
                return(Equals(jsString));
            }

            if (value.IsBigInt())
            {
                return(value.IsBigInt() && TypeConverter.TryStringToBigInt(ToString(), out var temp) && temp == value.AsBigInt());
            }

            return(base.IsLooselyEqual(value));
        }
示例#2
0
        public override bool IsLooselyEqual(JsValue value)
        {
            if (value is JsNumber jsNumber)
            {
                return(Equals(jsNumber));
            }

            if (value.IsBigInt())
            {
                return(TypeConverter.IsIntegralNumber(_value) && new BigInteger(_value) == value.AsBigInt());
            }

            return(base.IsLooselyEqual(value));
        }