crema

syntactic sugar for your javascript functions

var routes = crema('request -method=GET OR -method=POST authorize -> login');

Output:

[
  {
    "type": "request",
    "tags": {
      "method": "get"
    },
    "channel": {
      "value": "login",
      "paths": [
        {
          "value": "login",
          "param": false
        }
      ]
    },
    "thru": {
      "channel": {
        "value": "authorize",
        "paths": [
          {
            "value": "authorize",
            "param": false
          }
        ]
      }
    }
  }
]
crema('type -tag=value route OR route2');