Search results
32 packages found
Returns `true` if the path appears to be relative.
Returns true if a file path is absolute. Does not rely on the path module and can be used as a polyfill for node.js native `path.isAbolute`.
Detects if a file exists and returns the resolved filepath.
Find the first directory with a package.json, recursing up, starting with the given directory. Similar to look-up but does not support globs and only searches for package.json. Async and sync.
Resolve a directory that is either local, global or in the user's home directory.
Make a glob pattern absolute, ensuring that negative globs and patterns with trailing slashes are correctly handled.
Make a glob pattern absolute, ensuring that negative globs and patterns with trailing slashes are correctly handled.
Get installation path where the given package is installed. Works for globally and locally installed packages
Get the relative filepath from path A to path B. Calculates from file-to-directory, file-to-file, directory-to-file, and directory-to-directory.
Easily get the CWD (current working directory) of a project based on package.json, optionally starting from a given path. (node.js/javascript util)
Resolves a given package if it is installed locally, then tries to resolve it from global registry, using battle-tested [global-modules][] package. Better approach than internal `require.resolve`, so you can trust. You just get absolute filepath to some p
Make a glob pattern absolute, ensuring that negative globs and patterns with trailing slashes are correctly handled.
Ensures that absolute file paths are always returned from a glob pattern or array of glob patterns.
Resolve the path of a module from the directory where npm is installed
Resolve paths to globally installed npm modules using glob patterns. Useful for getting paths to yeoman or Generate generators, etc.
<div id="top"></div> <p align="center"> <a href="" rel="noopener"> <img width=50% src="./media/logo.png" alt="Project logo"></a> </p>
- object-oriented
- OOP
- oop
- resolve
- pathlib
- path library
- filepath library
- walk
- tree
- fs
- file
- filepath
- file path
- filesystem
- View more
Attempt to resolve the absolute filepath to a file and verify that it exists.
Return an array of resolved filepaths for require-able local or named npm modules. Wildcard (glob) patterns may be used.
An asynchronous and configurable implementation of require.resolve(), like node-resolve or enhanced-resolve.