UNPKG

@stryke/path

Version:

A package containing various utilities that expand the functionality of NodeJs's built-in `path` module

18 lines (17 loc) 2.51 kB
import { cwd } from "./cwd.mjs"; import { ABSOLUTE_PATH_REGEX, DRIVE_LETTER_REGEX, DRIVE_LETTER_START_REGEX, FILE_EXTENSION_REGEX, FULL_FILE_EXTENSION_REGEX, NPM_SCOPED_PACKAGE_REGEX, PACKAGE_PATH_REGEX, ROOT_FOLDER_REGEX, UNC_REGEX } from "./regex.mjs"; import { formatSlash, slash } from "./slash.mjs"; import { isParentPath } from "./is-parent-path.mjs"; import { join, joinPaths } from "./join-paths.mjs"; import { append, appendExtension, appendPath } from "./append.mjs"; import { DEFAULT_ASSET_EXTS } from "./asset-extensions.mjs"; import { correctPath, fileURLToPath, normalizeString, normalizeWindowsPath, pathToFileURL, pathToFileURLString, stripStars, toAbsolutePath, toRelativePath, withTrailingSlash, withoutTrailingSlash } from "./correct-path.mjs"; import { commonPath, findBasePath, findCommonPath } from "./common.mjs"; import { delimiter, posix, win32 } from "./delimiter.mjs"; import { basename, dirname, extname, findFileDotExtension, findFileDotExtensionSafe, findFileExtension, findFileExtensionSafe, findFileName, findFilePath, findFolderName, hasFileExtension, hasFileName, hasFilePath, hasFolderName, parsePath, relative, relativePath, relativeToCurrentDir, renameFile, resolve, resolvePath, resolvePaths } from "./file-path-fns.mjs"; import { globToRegex } from "./glob-to-regex.mjs"; import { isEqual } from "./is-equal.mjs"; import { isSystemRoot } from "./is-root-dir.mjs"; import { replaceExtension, replacePath } from "./replace.mjs"; import { resolveParentPath } from "./resolve-parent-path.mjs"; export { ABSOLUTE_PATH_REGEX, DEFAULT_ASSET_EXTS, DRIVE_LETTER_REGEX, DRIVE_LETTER_START_REGEX, FILE_EXTENSION_REGEX, FULL_FILE_EXTENSION_REGEX, NPM_SCOPED_PACKAGE_REGEX, PACKAGE_PATH_REGEX, ROOT_FOLDER_REGEX, UNC_REGEX, append, appendExtension, appendPath, basename, commonPath, correctPath, cwd, delimiter, dirname, extname, fileURLToPath, findBasePath, findCommonPath, findFileDotExtension, findFileDotExtensionSafe, findFileExtension, findFileExtensionSafe, findFileName, findFilePath, findFolderName, formatSlash, globToRegex, hasFileExtension, hasFileName, hasFilePath, hasFolderName, isEqual, isParentPath, isSystemRoot, join, joinPaths, normalizeString, normalizeWindowsPath, parsePath, pathToFileURL, pathToFileURLString, posix, relative, relativePath, relativeToCurrentDir, renameFile, replaceExtension, replacePath, resolve, resolveParentPath, resolvePath, resolvePaths, slash, stripStars, toAbsolutePath, toRelativePath, win32, withTrailingSlash, withoutTrailingSlash };