1 line
855 B
JSON
1 line
855 B
JSON
{"ast":null,"code":"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = toBlock;\n\nvar _generated = require(\"../validators/generated\");\n\nvar _generated2 = require(\"../builders/generated\");\n\nfunction toBlock(node, parent) {\n if ((0, _generated.isBlockStatement)(node)) {\n return node;\n }\n\n var blockNodes = [];\n\n if ((0, _generated.isEmptyStatement)(node)) {\n blockNodes = [];\n } else {\n if (!(0, _generated.isStatement)(node)) {\n if ((0, _generated.isFunction)(parent)) {\n node = (0, _generated2.returnStatement)(node);\n } else {\n node = (0, _generated2.expressionStatement)(node);\n }\n }\n\n blockNodes = [node];\n }\n\n return (0, _generated2.blockStatement)(blockNodes);\n}","map":null,"metadata":{},"sourceType":"script"} |