UNPKG

@marko/compiler

Version:
22 lines (20 loc) 562 B
"use strict";exports.__esModule = true;exports.enter = enter;exports.exit = exit; // Utilities for executing multi step compiler hooks (migrators & transformers). function enter(plugin, ...args) { const fn = plugin && ( plugin.enter || plugin.default && plugin.default.enter || plugin.default) || plugin; if (typeof fn === "function") { fn(...args); } } function exit(plugin, ...args) { const fn = plugin && ( plugin.exit || (plugin.default ? plugin.default.exit : undefined)); if (typeof fn === "function") { fn(...args); } }