Search results
178 packages found
Get the very first directory name from file path `./foo/bar/baz` -> `foo` or `../a/b/c` -> `../a`. Useful when you just want first real directory from given file path
Get the basename of a JSON filepath without the file extension.
Returns true if a filepath starts with the given string. Works with windows and posix/unix paths.
Make a glob pattern absolute, ensuring that negative globs and patterns with trailing slashes are correctly handled.
Remove leading directory components from a path, like tar's --strip-components option
Return true if a file path is (or has) a dotfile. Returns false if the path is a dot directory.
Get cross-platform XDG Base Directories or their equivalents. Works with Linux, Windows (win32), or MacOS (darwin).
Convert strings to valid filenames or filepaths
enforces folder and file names to match desired case style
Test if a value is an absolute path.
- stdlib
- stdassert
- assertion
- assert
- utilities
- utility
- utils
- util
- is
- is-absolute
- is-path
- path
- absolute
- filesystem
- View more
Test if a value is a relative path.
- stdlib
- stdassert
- assertion
- assert
- utilities
- utility
- utils
- util
- is
- is-relative
- is-path
- path
- relative
- filesystem
- View more
Test if a value is a UNC path.
Get installation path where the given package is installed. Works for globally and locally installed packages
Recursively read all files path from directory
Change the file extension of a path
A proxy to `path`, replacing `\` with `/` for all results
Write file to disk, using promises and creating recursively intermediate directories if they don't exist.
file path utils for the browser and node.js
Drop-in replacement for `fs.existsSync` with zero dependencies. Other libs I found either have crucial differences from fs.existsSync, or unnecessary dependencies. See README.md for more info.
Test if a value is a UNC path.