import { fileURLToPath } from 'node:url' const isMain = (meta) => { const path = fileURLToPath(meta.url) return path.includes(process.argv[1]) } const runifmain = async (meta, fn) => { if (isMain(meta)) { await fn() } } export { runifmain }