mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-23 18:21:13 +08:00
feat: TypedArray 原型方法族全量解锁(回调/查找/迭代/排序/ES2023 copy 族)
This commit is contained in:
@@ -520,6 +520,10 @@ pub fn strict_eq(lhs: JsValue, rhs: JsValue) -> bool {
|
||||
if lhs.is_int() && rhs.is_int() {
|
||||
return lhs.as_int() == rhs.as_int();
|
||||
}
|
||||
// Number 跨 int/double 表示比较:`42 === 42.0` 按 SameValue 语义应相等。
|
||||
if (lhs.is_int() || lhs.is_double()) && (rhs.is_int() || rhs.is_double()) {
|
||||
return strict_double_eq(to_f64(lhs), to_f64(rhs));
|
||||
}
|
||||
if lhs.is_double() && rhs.is_double() {
|
||||
return strict_double_eq(lhs.as_double(), rhs.as_double());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user