UNPKG

abi.js

Version:

[![typescript-icon]][typescript-link] [![license-icon]][license-link] [![status-icon]][status-link] [![ci-icon]][ci-link] [![twitter-icon]][twitter-link]

25 lines (24 loc) 592 B
import type { ParsedPath } from "../types.js"; export type { ParsedPath } from "../types.js"; /** * Return a `ParsedPath` object of the `path`. * * @example Usage * ```ts * import { parse } from "@std/path/posix/parse"; * import { assertEquals } from "@std/assert"; * * const path = parse("/home/user/file.txt"); * assertEquals(path, { * root: "/", * dir: "/home/user", * base: "file.txt", * ext: ".txt", * name: "file" * }); * ``` * * @param path The path to parse. * @returns The parsed path object. */ export declare function parse(path: string): ParsedPath;