Proxy-based FSM-like DSLs for ES6
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Proxies used here are recursive; upon property access they either keep their return value wrapped in a similar Proxy, or don't, based on certain conditions. From the perspective of an FSM each Proxy type could be seen as representing one state. The result: an FSM-based custom DSLs based on ES6 Proxy. This is similar to Tom van Cutsem's principle of Membranes.

Notes: must inject Observable

Esp. great for cleaning ng2 classes with methods like this:

load() {
  if ( {
    return Promise.resolve(;
  return new Promise(resolve => {
    this.http.get('data/data.json').subscribe(res => { = this.processData(res.json());


npm i -g jasmine-node
npm test
jasmine-node spec/extern-proxy.spec.js