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

/crema/

    Package Sidebar

    Install

    npm i crema

    Weekly Downloads

    133

    Version

    0.1.5

    License

    none

    Last publish

    Collaborators

    • architectd
    • crcn