javascript 0.3.0

A JavaScript engine implementation in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Feature probe for AggregateError.
// Emit only "OK" when minimum constructor behavior is available.
try {
  if (typeof AggregateError !== "function") {
    throw new Error("AggregateError missing");
  }

  const err = new AggregateError([], "msg");
  if (!err || typeof err !== "object") {
    throw new Error("AggregateError construction failed");
  }

  console.log("OK");
} catch (e) {
  // unsupported
  console.log("NO: " + e.message);
}