@guanghechen/helper-path
v5.0.9
Published
Utilities to handle url path and file path.
Readme
Utilities to handle url path and file path.
Install
npm
npm install --save @guanghechen/helper-pathyarn
yarn add @guanghechen/helper-path
Usage
Name | Description
:----------------------:|:----------------------------------------------------------------
FilepathResolver | Resolve relative / absolute path under the given rootDir.
absoluteOfWorkspace | Calc absolute filepath of p under the workspace.
findNearestFilepath | Find a nearest file matched the predicate from the given directory.
locateNearestFilepath | Locate a nearest target file path from the given directory.
normalizeUrlPath | Normalize url path.
relativeOfWorkspace | Calc relative filepath to workspace.
