@gmjs/path
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

Path Utilities

Some utility functions for manipulating file system paths.

Installation

npm install --save @gmjs/path

Functions

  • isInDir(rootDir: string, fsPath: string): boolean
    • Description - Returns true if fsPath is in rootDir. It can be nested any number of levels deep.
  • pathDir(fullPath: string): string
    • Description - Returns the parent directory of the path.
  • pathFsName(fullPath: string): string
    • Description - Returns the base name of the file or directory in the path, without the extension.
  • pathFsNameWithExtension(fullPath: string): string
    • Description - Returns the name of the file or directory in the path, with the extension.
  • pathWithoutExtension(fullPath: string): string
    • Description - Returns the entire path without the extension.
  • pathExtension(fullPath: string): string
    • Description - Returns the extension of the file in the path, or empty string if there is no extension.

Readme

Keywords

none

Package Sidebar

Install

npm i @gmjs/path

Weekly Downloads

0

Version

0.0.2

License

MIT

Unpacked Size

6.79 kB

Total Files

8

Last publish

Collaborators

  • mrzli