import { isAbsolute , join , parse } from 'path' ; export function getFilename ( path ) { return parse ( path ) . name ; } export function getFileExtension ( path ) { return parse ( path ) . ext ; } export function ensureAbsPath ( path ) { if ( isAbsolute ( path ) ) { return path ; } return join ( process . cwd ( ) , path ) ; }