UNPKG

@podlite/schema

Version:

AST tools for Podlite markup language

26 lines 909 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.pluginCleanLocation = void 0; /** * Delete location attribute * use in test suite */ const makeTransformer_1 = __importDefault(require("./helpers/makeTransformer")); const pluginCleanLocation = () => tree => { const transformer = (0, makeTransformer_1.default)({ '*': (node, ctx, visiter) => { if (node.content) { node.content = visiter(node.content, ctx, visiter); } delete node.location; return node; }, }); return transformer(tree, {}); }; exports.pluginCleanLocation = pluginCleanLocation; exports.default = exports.pluginCleanLocation; //# sourceMappingURL=plugin-clean-location.js.map