Espruino Feature List

What Follows is a table on JavaScript features and their implementation status in Espruino.

State is as follows:

  • - not implemented.
  • Yes implemented
  • Official implemented, but only in boards that have enough memory. All Official Espruino Boards have these features.
  • 1vxx implemented in version 1vxx

Summary

Espruino implements a large amount of the ES5 spec with parts of the ES6 spec where it is useful in an embedded environment.

Some features are left out intentionally where:

  • It would be too costly to implement them (eg. Unicode Strings)
  • They're generally considered bad practice (eg. labels)

Try Espruino for yourself online in the emulator

If you want a feature that isn't implemented you can vote on this GitHub issue

Any features not listed here, or differences in Espruino that users should be aware of? Please let us know!

General

Feature Implementation Status
Unicode Strings - (8 bit strings only)
Regular Expressions 1v95 Official (see below)
Labels -
Object.propertyIsEnumerable -
with keyword -
Semicolon insertion on newlines - return\n42; returns 42 in Espruino.
Function Hoisting -

Note: Espruino executes code by parsing as it executes. Function Hoisting wasn't implemented as it would require two passes, which would slow down execution.

ES5

List of ES5 features from http://kangax.github.io/compat-table/es5/

ES5 Feature Implementation Status
Strict Mode -
Multiline String Literals -
Accessors (Getters and Setters) 2v00 Official
Trailing commas in object/array Yes
Reserved words as property keys Yes
Reserved words as Identifiers (var of=1) -
Object.create/defineProperty/defineProperties Yes
Object.getPrototypeOf/keys Yes
Object.seal/freeze/preventExtensions -
Object.isSealed/isFrozen/isExtensible -
Object.getOwnPropertyDescriptor/getOwnPropertyNames Yes
Array.isArray Yes
[].indexOf Yes
[].lastIndexOf -
[].every/some/forEach/map Official
[].filter/reduce/reduceRight Official
[].sort Yes
String property access ("hi[0]`) Yes
"".trim Yes
Date.prototype.toISOString Yes
Date.now() Yes
Date.prototype.toJSON -
Function.prototype.bind Yes
JSON Yes
unassignable undefined/NaN/Infinity Yes
Function.prototype.apply with non-arrays Yes
parseInt ignores leading zeros Yes
Function "prototype" non-enumerable Yes
Arguments toStringTag is "Arguments" -
Zero-width chars in identifiers -
Unreserved words, eg volatile Yes
Enumerable properties can be shadowed by non-enumerables -
Thrown functions have proper "this" values Yes

ES6

List of ES6 features from http://es6-features.org:

ES6 Feature Implementation Status
Constants 2v14 (const is parsed but treated like var in earlier FW)
Block scoped Functions/Variables 2v14 (let is parsed but treated like var in earlier FW)
Arrow Functions 1v88 Official
Default Parameter Values -
Rest/Spread -
Template Literals 1v88 Official
Template Literal Raw String access -
Binary/Octal Literals Yes
Unicode String/RegExp -
RegExp Sticky Matching -
Enhanced Object Properties 2v14 (methods)
Destructing Assignment -
Modules (import/export) -
Class Definition 1v96 Official
Class Inheritance, Base Class Access 1v96 Official
Class Inheritance from Expressions -
Class Static Members 1v96 Official
Class Getters/Setters 2v00 Official
Symbol Type -
Iterators -
Generators -
Map/Set/WeakMap/WeakSet -
Typed Arrays Yes
Object.assign Yes
[].findIndex 2v00 Official
"".repeat 2v00 Official
"".startsWith/endsWith/includes 2v00 Official
Number.isNaN/isFinite - (global isNaN/isFinite are implemented)
Number.isSafeInteger -
Number.EPSILON -
Math.trunc -
Math.sign 2v16
Promises 1v86 Official
Promise Combination 1v90 Official
Proxying / Reflection -
Internationalization & Localization -

ES7/ES8 (2016/2017)

ES7 Feature Implementation Status
Array.prototype.includes 2v05 Official
String.prototype.padStart/End 2v08 Official
Exponentiation Operator (**) -
Exponentiation Assignment (**=) -
Async functions -
Async generators -
Object.getOwnPropertyDescriptors 2v17
Object.values/Object.entries 2v14
Typed Objects -
Trailing commas in function syntax -
Object rest/spread properties -

ES9/ES10 (2018/2019)

ES9/ES10 Feature Implementation Status
Asynchronous Iteration -
Promise.finally -
Object Rest Properties -
New RegExp Features -
String.trimStart() -
String.trimEnd() -
Object.fromEntries 2v17
Optional catch binding 2v20
Array.flat() -
Array.flatMap() -
Revised Array.sort() No - uses quicksort
Revised JSON.stringify() UTF8-enabled builds
Separator symbols allowed in string literals UTF8-enabled builds

ES2020

ES2020 Feature Implementation Status
BigInt -
String.matchAll() -
The Nullish Coalescing Operator (??) 2v14
The Optional Chaining Operator (?.) PR
Logical AND Assignment Operator (&&=) -
Logical OR Assignment (` =`) -
Nullish Coalescing Assignment (??=) -
Promise allSettled() -
Dynamic Import -

ES2021

| Promise.any() | - | | String.replaceAll() | - | | Numeric Separators (_) | 2v14 |

Regular Expressions

Espruino aims to support most commonly used RegExp contructs, however some parts of the spec are not implemented:

There's a GitHub issue concerning RegExp features here

This page is auto-generated from GitHub. If you see any mistakes or have suggestions, please let us know.