Jurassic is an implementation of the ECMAScript language and runtime. It aims to provide the best performing and most standards-compliant implementation of JavaScript for .NET. Jurassic is not intended for end-users; instead it is intended to be integrated into .NET programs. If you are the author of a .NET program, you can use Jurassic to compile and execute JavaScript code.
- Supports all ECMAScript 3 and ECMAScript 5 functionality, including ES5 strict mode
- Well tested - passes over five thousand unit tests (with over thirty thousand asserts)
- Simple yet powerful API
- Compiles JavaScript into .NET bytecode (CIL); not an interpreter
- Deployed as a single .NET assembly (no native code)
- Basic support for integrated debugging within Visual Studio
- Uses light-weight code generation, so generated code is fully garbage collected
- Tested on .NET 3.5, .NET 4 and Silverlight
Install the NuGet package.
See the wiki for full usage details.
Support for ECMAScript 6 is in progress. See http://kangax.github.io/compat-table/es6/ for the definition of each feature.
Feature | Status |
---|---|
Optimization | |
proper tail calls (tail call optimisation) | ❌ |
Syntax | |
default function parameters | ❌ |
rest parameters | ❌ |
spread (...) operator | ❌ |
object literal extensions | ❌ |
for..of loops | ❌ |
octal and binary literals | ✅ 4/4 |
template literals | ❌ |
RegExp "y" and "u" flags | ❌ |
destructuring, declarations | ❌ |
destructuring, assignment | ❌ |
destructuring, parameters | ❌ |
Unicode code point escapes | ❌ |
new.target | ❌ |
Bindings | |
const | ❌ |
let | ❌ |
block-level function declaration | ❌ |
Functions | |
arrow functions | ❌ |
class | ❌ |
super | ❌ |
generators | ❌ |
Built-ins | |
typed arrays | 10/46 |
Map | ❌ |
Set | ❌ |
WeakMap | ❌ |
WeakSet | ❌ |
Proxy | ❌ |
Reflect | ❌ |
Promise | ❌ |
Symbol | ❌ |
well-known symbols | ❌ |
Built-in extensions | |
Object static methods | 2/4 |
function "name" property | ❌ |
String static methods | 1/2 |
String.prototype methods | 6/8 |
RegExp.prototype properties | 1/6 |
Array static methods | ❌ |
Array.prototype methods | 1/10 |
Number properties | ✅ 7/7 |
Math methods | ✅ 17/17 |
Subclassing | |
Array is subclassable | ❌ |
RegExp is subclassable | ❌ |
Function is subclassable | ❌ |
Promise is subclassable | ❌ |
miscellaneous subclassables | ❌ |
Misc | |
prototype of bound functions | ❌ |
Proxy, internal 'get' calls | ❌ |
Proxy, internal 'set' calls | ❌ |
Proxy, internal 'defineProperty' calls | ❌ |
Proxy, internal 'deleteProperty' calls | ❌ |
Proxy, internal 'getOwnPropertyDescriptor' calls | ❌ |
Proxy, internal 'ownKeys' calls | ❌ |
Object static methods accept primitives | ✅ 10/10 |
own property order | ❌ |
miscellaneous | 2/10 |
Annex B | |
non-strict function semantics | ❌ |
_proto_ in object literals | ❌ |
Object.prototype._proto_ | ❌ |
String.prototype HTML methods | ✅ 3/3 |
RegExp.prototype.compile | ✅ 1/1 |
RegExp syntax extensions | ❌ |
HTML-style comments | ❌ |