@types/path-browserify
- Version 1.0.3
- Published
- 6.52 kB
- No dependencies
- MIT license
Install
npm i @types/path-browserify
yarn add @types/path-browserify
pnpm add @types/path-browserify
Overview
TypeScript definitions for path-browserify
Index
Variables
variable path
const path: path.Path;
Provides path-related utilities for handling and transforming file paths.
Interfaces
interface Path
interface Path {}
Provides methods and properties for handling and transforming file paths.
property delimiter
readonly delimiter: string;
The platform-specific path delimiter.
property posix
readonly posix: Path;
Provides methods for handling POSIX paths.
property sep
readonly sep: string;
The platform-specific path segment separator.
property win32
readonly win32: null;
Provides methods for handling Windows paths (always
null
).
method basename
basename: (this: void, path: string, ext?: string) => string;
Returns the base name of a file, optionally removing the file extension.
Parameter path
The path to get the base name from.
Parameter ext
An optional extension to remove from the base name.
Returns
The base name of the file.
method dirname
dirname: (this: void, path: string) => string;
Returns the directory name of a path.
Parameter path
The path to get the directory name from.
Returns
The directory name of the path.
method extname
extname: (this: void, path: string) => string;
Returns the file extension of a path.
Parameter path
The path to get the extension from.
Returns
The file extension of the path.
method format
format: (this: void, pathObject: Partial<PathObject>) => string;
Formats a path object into a path string.
Parameter pathObject
The path object to format.
Returns
The formatted path string.
method isAbsolute
isAbsolute: (this: void, path: string) => boolean;
Determines if a path is absolute.
Parameter path
The path to check.
Returns
true
if the path is absolute,false
otherwise.
method join
join: (this: void, ...paths: string[]) => string;
Joins multiple path segments into a single path.
Parameter paths
The path segments to join.
Returns
The joined path.
method normalize
normalize: (this: void, path: string) => string;
Normalizes a path, resolving '..' and '.' segments.
Parameter path
The path to normalize.
Returns
The normalized path.
method parse
parse: (this: void, path: string) => PathObject;
Parses a path string into a path object.
Parameter path
The path string to parse.
Returns
The parsed path object.
method relative
relative: (this: void, from: string, to: string) => string;
Returns the relative path from one path to another.
Parameter from
The starting path.
Parameter to
The destination path.
Returns
The relative path from
from
toto
.
method resolve
resolve: (this: void, ...pathSegments: string[]) => string;
Resolves a sequence of paths or path segments into an absolute path.
Parameter pathSegments
The sequence of path segments to resolve.
Returns
The resolved absolute path.
interface PathObject
interface PathObject {}
Represents a file path as an object with components.
property base
base: string;
The base name of the file, including the extension.
property dir
dir: string;
The directory portion of the path.
property ext
ext: string;
The file extension including the dot.
property name
name: string;
The file name without the extension.
property root
root: string;
The root portion of the path.
Package Files (1)
Dependencies (0)
No dependencies.
Dev Dependencies (0)
No dev dependencies.
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/path-browserify
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/path-browserify)
- HTML<a href="https://www.jsdocs.io/package/@types/path-browserify"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 3423 ms. - Missing or incorrect documentation? Open an issue for this package.