UNPKG

@marko/translator-default

Version:
22 lines (20 loc) 569 B
"use strict";exports.__esModule = true;exports.enter = enter;exports.exit = exit; // Utilities for executing multi step compiler hooks (code generators in this package). 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); } }