Topiarist

Topiarist provides tree and shape-based type verification for JavaScript.

Build Status

Details

You can see the main page here, or the git repository here. The specification is here. Actual js file is at https://github.com/BladeRunnerJS/topiarist/blob/gh-pages/lib/topiarist.js.

You can also read the introductory blog post.

This page has the library loaded so you can experiment by opening up a console.

A Note on implementation

This library makes liberal use of nonenumerable attributes and Object.getPrototypeOf. It is therefore suitable only for ecmascript 5 engines. It will work in ecmascript 6 engines but there would be a much nicer implementation in that case, using Map and private symbols.

Usage

This library provides the following action methods:

And the following query methods:

The following convenience methods are also provided:

Fork me on GitHub