Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/Aquaticat/Monochromatic. TypeScript and Rust monorepo: Claude Code and Pi coding-agent plugins, a m
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798/** POSIX path operations delegating to `node:path/posix`, selected by `package.json` `imports` under the `node` condition of `#posix-path` (Node and Bun, and every bundler building for the `node` platform). Exports the same names with the same signatures as `posix-path.neutral.ts`, so the public entry is identical across both builds and the neutral declarations describe both.
@module */
import { posix, } from 'node:path';
/** POSIX path separator. */export const sep = '/';
/** Whether a path starts with `/`, per `node:path/posix`.
@param filePath - Path to check
@returns True when the path is absolute
@example ```ts isAbsolute('/foo/bar'); // true ``` */export function isAbsolute(filePath: string,): boolean { return posix.isAbsolute(filePath,);}
/** Normalizes a path per `node:path/posix`.
@param filePath - Raw path to normalize
@returns Normalized path
@example ```ts normalize('/foo/bar//baz/./qux/../quux'); // '/foo/bar/baz/quux' ``` */export function normalize(filePath: string,): string { return posix.normalize(filePath,);}
/** Returns the directory portion of a POSIX path per `node:path/posix`.
@param filePath - POSIX path
@returns Parent directory path
@example ```ts dirname('/foo/bar/baz.ts'); // '/foo/bar' ``` */export function dirname(filePath: string,): string { return posix.dirname(filePath,);}
/** Joins path segments per `node:path/posix`.
@param segments - Path segments to join
@returns Joined and normalized path
@example ```ts join(['/foo', 'bar', 'baz']); // '/foo/bar/baz' ``` */export function join(segments: readonly string[],): string { return posix.join(...segments,);}
/** Resolves a sequence of paths to an absolute path per `node:path/posix`.
@param segments - Path segments to resolve
@returns Absolute, normalized path
@example ```ts resolve(['/foo', 'bar', 'baz']); // '/foo/bar/baz' ``` */export function resolve(segments: readonly string[],): string { return posix.resolve(...segments,);}