Skip to content
Chris Toshok edited this page Mar 17, 2014 · 7 revisions

These two tables are taken from @kangax's great browser compatibility matrices, with the wiki conversion losing a lot of nice formatting, alas.

ES5 EJS Support ES6 EJS Support
Object.create Yes computed properties No
Object.defineProperty Yes arrow functions Yes
Object.defineProperties Yes class Yes
Object.getPrototypeOf Yes let Yes
Object.keys No const No
Object.seal Yes default function params Yes[2]
Object.freeze Yes rest parameters Yes
Object.preventExtensions Yes spread call (...) operator No
Object.isSealed Yes spread array (...) operator No
Object.isExtensible Yes Modules No
Object.getOwnPropertyDescriptor Yes For..of loops No
Object.getOwnPropertyNames Yes Array comprehensions No
Date.prototype.toISOString No Generator comprehensions No
Date.now Yes Iterators No
Array.isArray Yes Generators (yield) No
JSON Yes Template Strings No
Function.prototype.bind Yes RegExp "y" flag No
String.prototype.trim No Map Partial
Array.prototype.indexOf Yes Set No
Array.prototype.lastIndexOf Yes WeakMap No
Array.prototype.every Yes WeakSet No
Array.prototype.some Yes Proxy No
Array.prototype.forEach Yes Struct (binary data storage) No
Array.prototype.map Yes Block-level function declaration Yes
Array.prototype.filter No Destructuring Yes
Array.prototype.reduce Yes Promise No
Array.prototype.reduceRight Yes Object.assign No
Getter in property initializer No Object.getOwnPropertyDescriptors No
Setter in property initializer No Object.getPropertyDescriptor No
Property access on strings Yes Object.getPropertyNames No
Reserved words as property names Yes Object.is No
Zero-width chars in identifiers Object.setPrototypeOf No
Immutable undefined No Object.observe (part of ES7) No
Strict mode Yes String.fromCodePoint No
new Function No [1] String.prototype.codePointAt No
eval No [1] String.prototype.repeat No
                             |                        | String.prototype.startsWith      | **No**
                             |                        | String.prototype.endWith         | **No**
                             |                        | String.prototype.contains        | **No**
                             |                        | String.prototype.toArray         | **No**
                             |                        | Symbol                           | **No**
                             |                        | Unicode code point escapes       | **No**
                             |                        | Array.from                       | Yes
                             |                        | Array.of                         | Yes
                             |                        | Array.prototype.find             | Yes
                             |                        | Array.prototype.findIndex        | Yes
                             |                        | Array.prototype.fill             | **No**
                             |                        | Number.isFinite                  | **No**
                             |                        | Number.isInteger                 | **No**
                             |                        | Number.isNaN                     | **No**
                             |                        | Number.toInteger                 | **No**
                             |                        | Number.prototype.clz             | **No**
                             |                        | Math.imul                        | **No**
                             |                        | Math.sign                        | **No**
                             |                        | Math.log10                       | **No**
                             |                        | Math.log2                        | **No**
                             |                        | Math.log1p                       | **No**
                             |                        | Math.expm1                       | **No**
                             |                        | Math.cosh                        | **No**
                             |                        | Math.sinh                        | **No**
                             |                        | Math.tanh                        | **No**
                             |                        | Math.acosh                       | **No**
                             |                        | Math.asinh                       | **No**
                             |                        | Math.atanh                       | **No**
                             |                        | Math.hypot                       | **No**
                             |                        | Math.trunc                       | **No**
                             |                        | Math.fround                      | **No**

Notes:

  1. as a static compiler, ejs doesn't support these constructs as they generally require runtime code generation.
  2. ejs incorrectly uses the default parameter value if undefined is passed for that argument.

Clone this wiki locally