kataan 0.0.4

A high-performance JavaScript engine written in pure Rust. Library, C FFI, and CLI.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/*---
description: includes with NaN, -0, and various types
esid: sec-array.prototype.includes
---*/
assert.sameValue([1, 2, NaN].includes(NaN), true, "SameValueZero finds NaN");
assert.sameValue([1, 2, 3].includes(2), true);
assert.sameValue([1, 2, 3].includes(4), false);
assert.sameValue([0].includes(-0), true, "0 and -0 are SameValueZero");
assert.sameValue(["a", "b"].includes("a"), true);
assert.sameValue([undefined].includes(undefined), true);
assert.sameValue([null].includes(null), true);
assert.sameValue("hello".includes("ell"), true);
assert.sameValue("hello".includes("xyz"), false);
var obj = {};
assert.sameValue([obj].includes(obj), true, "by identity");
assert.sameValue([{}].includes({}), false);