bajo
Version:
A framework to build a giant monstrous app rapidly
12 lines (9 loc) • 318 B
JavaScript
import path from 'path'
import resolvePath from './resolve-path.js'
import { fileURLToPath } from 'url'
const currentLoc = (meta) => {
const file = resolvePath(fileURLToPath(meta.url))
const dir = path.dirname(file)
return { dir, file, __dirname: dir, __filename: file }
}
export default currentLoc