crema

0.1.5 • Public • Published

Example

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

Output:

[
  {
    "type": "request",
    "tags": {
      "method": "get"
    },
    "path": {
      "value": "login",
      "segments": [
        {
          "value": "login",
          "param": false
        }
      ]
    },
    "thru": {
      "path": {
        "value": "authorize",
        "segments": [
          {
            "value": "authorize",
            "param": false
          }
        ]
      }
    }
  }
]

Syntax

crema('type -tag=value route OR route2');

Custom Grammar

Use Cases

Readme

Keywords

none

Package Sidebar

Install

npm i crema

Weekly Downloads

49

Version

0.1.5

License

none

Last publish

Collaborators

  • architectd
  • crcn