Compatibility

This page describes the JavaScript surface provided by njs:

Definitions of njs specific properties and methods not compliant with ECMAScript can be found in Reference. Definitions of standard ECMAScript objects and methods can be found in the ECMAScript specification.

njs and nginx objects, modules, and Buffer

The objects, modules, and methods listed below are available with both the QuickJS and njs engines, unless noted otherwise.

ECMAScript compliance (njs engine)

The ECMAScript language features listed below describe the njs engine, which is deprecated since 1.0.0. The QuickJS engine supports ES2023; new code should use the QuickJS engine instead.

The njs engine is implemented in compliance with ECMAScript 5.1 (strict mode) with some ECMAScript 6 and later extensions. The compliance is still evolving.