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: Private class fields store, read, and are non-enumerable
esid: sec-class-definitions
---*/
class Box {
  #value = 0;
  set(v) { this.#value = v; return this.#value; }
  read() { return this.#value; }
}
var b = new Box();
assert.sameValue(b.set(42), 42);
assert.sameValue(b.read(), 42, "private field round-trips");

b.pub = 7;
// The private field never appears in enumeration.
assert.sameValue(Object.keys(b).join(","), "pub", "private field and methods are non-enumerable");