UNPKG

specpress

Version:

Export PDF and/or DOCX files from a subset of Markdown, ASN.1 and JSON files

12 lines (8 loc) 336 B
import { basename, normalize } from "path"; export function getFileName(pathFiile) { // Normalize the path to handle any relative paths or extra slashes const normalizedPath = normalize(pathFiile); // Get the base name of the path, which is the file name const fileName = basename(normalizedPath); return fileName; }