UNPKG

dts-bundle-generator

Version:
10 lines (9 loc) • 313 B
import * as path from 'path'; import * as process from 'process'; import { fixPath } from './fix-path.js'; export function getAbsolutePath(fileName, cwd) { if (!path.isAbsolute(fileName)) { fileName = path.join(cwd !== undefined ? cwd : process.cwd(), fileName); } return fixPath(fileName); }