Skip to main content
Home
This release is 28 versions behind 1.1.4 — the latest version of @std/path. Jump to latest

Utilities for working with file system paths

This package works with Cloudflare Workers, Deno, Browsers
This package works with Cloudflare Workers
This package works with Deno
This package works with Browsers
JSR Score
94%
Published
2 years ago (0.217.0)
Package root>parse.ts
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. // This module is browser compatible. import { isWindows } from "./_os.ts"; import type { ParsedPath } from "./_interface.ts"; import { parse as posixParse } from "./posix/parse.ts"; import { parse as windowsParse } from "./windows/parse.ts"; /** * Return a `ParsedPath` object of the `path`. * @param path to process */ export function parse(path: string): ParsedPath { return isWindows ? windowsParse(path) : posixParse(path); }