njs is created in compliance with ECMAScript 5.1 (strict mode) with some ECMAScript 6 and later extensions. The compliance is still evolving.
var, if, else, switch, for, for in, while, do while, break, continue, return, try, catch, throw, finally Number and Math properties and methods String methods: fromCharCode, concat, slice, substring, substr, charAt, indexOf, lastIndexOf, toLowerCase, toUpperCase, trim, search, match, split, replace fromCodePoint, codePointAt, includes, startsWith, endsWith, repeat padStart, padEnd bytesFrom (0.2.3) fromUTF8, toUTF8, fromBytes, toBytes Object methods: create (support without properties list), keys, defineProperty, defineProperties, getOwnPropertyDescriptor, getPrototypeOf, hasOwnProperty, isPrototypeOf, preventExtensions, isExtensible, freeze, isFrozen, seal, isSealed Array methods: isArray, slice, splice, push, pop, unshift, shift, reverse, sort, join, concat, indexOf, lastIndexOf, forEach, some, every, filter, map, reduce, reduceRight of, fill, find, findIndex includes Function methods: call, apply, bind RegExp methods: test, exec Date methods JSON object arguments object (0.2.5) isFinite, isNaN, parseFloat, parseInt, decodeURI, decodeURIComponent, encodeURI, encodeURIComponent Error objects: Error, EvalError, InternalError, RangeError, ReferenceError, SyntaxError, TypeError, URIError setTimeout and clearTimeout functions (0.2.0) File system methods: fs.readFileSync, fs.appendFileSync, fs.writeFileSync Crypto methods (0.2.0): crypto.createHash, crypto.createHmac let and const declarations eval function new Function() constructor setInterval, setImmediate functions
© 2002-2018 Igor Sysoev
© 2011-2018 Nginx, Inc.
Licensed under the BSD License.
https://nginx.org/en/docs/njs/compatibility.html