UNPKG

@flex-development/pathe

Version:

Universal drop-in replacement for node:path

115 lines (114 loc) 1.51 kB
import { delimiterWindows, sepWindows } from "#internal/constants"; import { addExt, basename, changeExt, cwd, delimiter, dirname, dot, extToValue, extname, extnames, fileURLToPath, format, formatExt, isAbsolute, isDeviceRoot, isSep, isURL, join, matchesGlob, normalize, parse, pathToFileURL, relative, removeExt, resolve, resolveWith, root, sep, toNamespacedPath, toPath, toPosix } from "#lib"; const posix = { basename, delimiter, dirname, extname, format, isAbsolute, join, matchesGlob, normalize, parse, posix: {}, relative, resolve, sep, toNamespacedPath, win32: {} }; const win32 = { basename, delimiter: delimiterWindows, dirname, extname, format, isAbsolute, join, matchesGlob, normalize, parse, posix: {}, relative, resolve, sep: sepWindows, toNamespacedPath, win32: {} }; posix.win32 = win32.win32 = win32; posix.posix = win32.posix = posix; posix._makeLong = posix.toNamespacedPath; win32._makeLong = win32.toNamespacedPath; const pathe = { addExt, basename, changeExt, cwd, delimiter, dirname, dot, extToValue, extname, extnames, fileURLToPath, format, formatExt, isAbsolute, isDeviceRoot, isSep, isURL, join, matchesGlob, normalize, parse, pathToFileURL, posix, relative, removeExt, resolve, resolveWith, root, sep, toNamespacedPath, toPath, toPosix, win32 }; export { pathe as default, posix, win32 };