njs is created in compliance with ECMAScript 5.1 (strict mode) with some ECMAScript 6 and later extensions. The compliance is still evolving.
Definitions of njs specific properties and methods not compliant with ECMAScript can be found in Reference. Definitions of njs properties and methods compliant with ECMAScript can be found in ECMAScript specification.
break, catch, continue, do while, else, finally, for, for in, if, return, switch, throw, try, var, while, labeled statements (0.2.8) Math properties: E, LN10, LN2, LOG10E, LOG2E, PI, SQRT1_2, SQRT2 Math methods: abs, acos, acosh, asin, asinh, atan, atan2, atanh, cbrt, ceil, clz32, cos, cosh, exp, expm1, floor, fround, hypot, imul, log, log10, log1p, log2, max, min, pow, random, round, sign, sin, sinh, sqrt, tan, tanh, trunc Number properties: EPSILON, MAX_SAFE_INTEGER, MAX_VALUE, MIN_SAFE_INTEGER, MIN_VALUE, NEGATIVE_INFINITY, NaN, POSITIVE_INFINITY Number methods: isFinite, isInteger, isNaN, isSafeInteger, parseFloat, parseInt Number instance methods: String methods: fromCharCode fromCodePoint String instance methods: charAt, concat, indexOf, lastIndexOf, match, replace, search, slice, split, substr, substring, toLowerCase, trim, toUpperCase codePointAt, endsWith, includes, repeat, startsWith padEnd, padStart trimEnd (0.3.4), trimStart (0.3.4) bytesFrom (0.2.3), fromBytes, fromUTF8, toBytes, toUTF8 Object methods: create (support without properties list), defineProperties (accessor descriptors support since 0.3.3), defineProperty (accessor descriptors support since 0.3.3), freeze, getOwnPropertyDescriptor, getOwnPropertyDescriptors (0.3.1), getOwnPropertyNames (0.3.1), getPrototypeOf, isExtensible, isFrozen, isSealed, keys, preventExtensions, seal assign (0.3.7) entries (0.2.7), values (0.2.7) Object instance methods: Array methods: isArray of Array instance methods: concat, every, filter, forEach, indexOf, join, lastIndexOf, map, pop, push, reduce, reduceRight, reverse, shift, slice, some, sort, splice, unshift copyWithin (0.3.7), fill, find, findIndex includes ArrayBuffer methods (0.3.8): isView ArrayBuffer instance methods (0.3.8): slice Typed-array constructors (0.3.8): Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array Typed-array instance methods (0.3.8): Buffer methods (0.4.4): Buffer instance methods: (0.4.4): compare, copy, equals, fill, includes, indexOf, lastIndexOf, readIntBE, readInt8, readInt16BE, readInt32BE, readIntLE, readInt8, readInt16LE, readInt32LE, readUIntBE, readUInt8, readUInt16BE, readUInt32BE, readUIntLE, readUInt8, readUInt16LE, readUInt32LE, readDoubleBE, readDoubleLE, readFloatBE, readFloatLE, subarray, slice, swap16, swap32, swap64, toJSON, toString, write, writeIntBE, writeInt8, writeInt16BE, writeInt32BE, writeIntLE, writeInt8, writeInt16LE, writeInt32LE, writeUIntBE, writeUInt8, writeUInt16BE, writeUInt32BE, writeUIntLE, writeUInt8, writeUInt16LE, writeUInt32LE, writeDoubleBE, writeDoubleLE, writeFloatBE, writeFloatLE Promise methods (0.3.8): reject, resolve Promise instance methods (0.3.8): catch, finally, then Function instance methods: apply, bind, call RegExp instance methods: exec, test, toString RegExp ES9 named capture groups (0.3.2) DataView instance methods (0.4.4): getFloat32, getFloat64, getInt16, getInt32, getInt8, getUint16, getUint32, getUint8, setFloat32, setFloat64, setInt16, setInt32, setInt8, setUint16, setUint32, setUint8 Date methods: now, parse, UTC Date instance methods: getDate, getDay, getFullYear, getHours, getMilliseconds, getMinutes, getMonth, getSeconds, getTime, getTimezoneOffset, getUTCDate, getUTCDay, getUTCFullYear, getUTCHours, getUTCMilliseconds, getUTCMinutes, getUTCMonth, getUTCSeconds, toDateString, toISOString, toLocaleDateString, toLocaleString, toLocaleTimeString, toTimeString, toUTCString, setDate, setFullYear, setHours, setMinutes, setMilliseconds, setMonth, setSeconds, setTime, setUTCDate, setUTCFullYear, setUTCHours, setUTCMilliseconds, setUTCMinutes, setUTCMonth, setUTCSeconds JSON methods: parse stringify arguments object (0.2.5) decodeURI, decodeURIComponent, encodeURI, encodeURIComponent, isFinite, isNaN, parseFloat, parseInt Error objects: Error, EvalError, InternalError, RangeError, ReferenceError, SyntaxError, TypeError, URIError clearTimeout and setTimeout functions (0.2.0) File system methods: fs.accessSync (0.3.9), fs.appendFileSync, fs.mkdirSync (0.4.2), fs.readdirSync (0.4.2), fs.readFileSync, fs.realpathSync (0.3.9), fs.renameSync (0.3.4), fs.rmdirSync (0.4.2), fs.symlinkSync (0.3.9), fs.unlinkSync (0.3.9), fs.writeFileSync fs.promises API (0.3.9), asynchronous version of file system methods. Crypto methods (0.2.0): crypto.createHash, crypto.createHmac Query String methods (0.4.3): querystring.decode, querystring.encode, querystring.escape, querystring.parse, querystring.stringify, querystring.unescape TextDecoder methods (0.4.3): encoding, fatal, ignoreBOM, decode TextEncoder methods (0.4.3): encoding, encode, encodeInto export and default import statements (0.3.0)
© 2002-2020 Igor Sysoev
© 2011-2020 Nginx, Inc.
Licensed under the BSD License.
https://nginx.org/en/docs/njs/compatibility.html