Mascara Try it Download Buy About Documentation Blog

About Mascara

Mascara is a development tool for medium to advanced JavaScript development. More specifically it is a code analyzer and compiler which support an enhanced version of JavaScript (incorporating newer language features not supported by all browsers) and generates output "object code" which runs in any browser.

The high level goal is to make JavaScript development more productive and exciting and less tedious and error prone. See design goals and philosophy for details.

Language features

  • Class based objects
  • Packages
  • Type annotations and type inference
  • Parameterized types
  • Variable scoping control and definite assignment analysis
  • Array comprehensions
  • Destructuring assignments
  • Nullability analysis
See a more complete walkthrough of language features with examples.

How it works

Mascara parses and analyzes the source code files, and links and translate the code into simpler JavaScript with the same semantics. This is possible because JavaScript has a very flexible language core which allows it to emulate higher level language feature.

For example, this code:

package {
   var a = 1;
is translated into:
   var a = 1;

Try the online tool to explore in detail how code is processed.

How it is used

Mascara is used at development time, either hooked into an editor or as a stand-alone command line compiler/verifier. (The Eclipse plug-in integrates directly with the Eclipse editor, but is still in beta.)

The generated output code is deployed to the server as static source files, and does not have any runtime requirement on the server or client.


Mascara tracks the ECMAScript standard, and the goal is to be ECMAScript 6/Harmony compatible when that standard is finalized. More...

When is it appropriate

Mascara is most appropriate for medium to high complexity projects, or projects requiring code quality and verification. If you only need a few lines of code to show a dropdown, the benefit might honestly not be so great. But if the project grows, Mascara can be applied gradually.

Compared to...

See how Mascara relates to other frameworks like CoffeScript, GWT, Node.js etc.


Mascara is written in Python. It should run on any platform that Python runs on, which is practically everywhere. It requires python 2.7 to be installed but otherwise have no dependencies.


Mascara is a commercial product, but is free for learning and non-commercial use. Source is available for customers upon request, but we don't have a public source repository at this point.

Where do I start?

Try it online to get a feel for it, or download it and start developing right away!