parse-js 0.4.1

JavaScript parsing library
Documentation
{
  "$t": "JsxElement",
  "attributes": [
    {
      "$t": "JsxAttribute",
      "name": {
        "$t": "JsxName",
        "name": "x",
        "namespace": null
      },
      "value": {
        "$t": "JsxExpressionContainer",
        "value": {
          "$t": "LiteralNumberExpr",
          "value": 1.0
        }
      }
    },
    {
      "$t": "JsxAttribute",
      "name": {
        "$t": "JsxName",
        "name": "y",
        "namespace": null
      },
      "value": {
        "$t": "JsxText",
        "value": "'a'"
      }
    }
  ],
  "children": [
    {
      "$t": "JsxText",
      "value": "  a\n  "
    },
    {
      "$t": "JsxElement",
      "attributes": [
        {
          "$t": "JsxAttribute",
          "name": {
            "$t": "JsxName",
            "name": "z",
            "namespace": "xLa"
          },
          "value": {
            "$t": "JsxText",
            "value": "\"a\""
          }
        }
      ],
      "children": [
        {
          "$t": "JsxExpressionContainer",
          "value": {
            "$t": "LiteralNumberExpr",
            "value": 1.0
          }
        },
        {
          "$t": "JsxExpressionContainer",
          "value": {
            "$t": "LiteralNumberExpr",
            "value": 2.0
          }
        },
        {
          "$t": "JsxText",
          "value": " "
        },
        {
          "$t": "JsxExpressionContainer",
          "value": {
            "$t": "JsxElement",
            "attributes": [
              {
                "$t": "JsxSpreadAttribute",
                "value": {
                  "$t": "LiteralObjectExpr",
                  "members": [
                    {
                      "$t": "ObjectMember",
                      "typ": {
                        "valued": {
                          "key": "a",
                          "value": {
                            "property": {
                              "initializer": {
                                "$t": "IdentifierExpr",
                                "name": "b"
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "$t": "ObjectMember",
                      "typ": {
                        "shorthand": "c"
                      }
                    }
                  ]
                }
              }
            ],
            "children": [],
            "name": {
              "$t": "JsxName",
              "name": "a",
              "namespace": "nu"
            }
          }
        }
      ],
      "name": {
        "$t": "JsxName",
        "name": "a43",
        "namespace": "bc1"
      }
    },
    {
      "$t": "JsxText",
      "value": "\n  a "
    },
    {
      "$t": "JsxElement",
      "attributes": [],
      "children": [],
      "name": {
        "$t": "JsxMember",
        "base": "red",
        "path": [
          "a"
        ]
      }
    },
    {
      "$t": "JsxText",
      "value": " bb\n    bb  "
    },
    {
      "$t": "JsxElement",
      "attributes": [],
      "children": [],
      "name": null
    }
  ],
  "name": {
    "$t": "JsxMember",
    "base": "a",
    "path": [
      "b",
      "c"
    ]
  }
}