Language baseline for the deprecated njs engine
masterThe deprecated njs engine implements ECMAScript 5.1 (strict mode) with a curated set of ES6+ extensions.
Supported features include:
- Arrow functions,
let/const, and template literals. Promisewith full prototype methods.async/await(only insideasyncfunctions; top-levelawaitis not supported).- Rest parameters:
function f(...rest). - Optional chaining
?., nullish coalescing??, and logical assignments||=/&&=/??=(since version 0.9.6). - ES2016 exponentiation operator
**. - A subset of
Symbol(for,keyFor). - ES Modules: Only default
importand defaultexportare supported. Non-default forms (e.g.,import { x } from "...") will result in aNon-default import is not supportederror. require()(supported but deprecated;importis preferred).