{"id":15813830,"url":"https://github.com/flex-development/pathe","last_synced_at":"2026-03-09T05:31:17.606Z","repository":{"id":64853581,"uuid":"574691728","full_name":"flex-development/pathe","owner":"flex-development","description":"Universal drop-in replacement for node:path","archived":false,"fork":false,"pushed_at":"2026-02-27T10:26:14.000Z","size":7645,"stargazers_count":0,"open_issues_count":8,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-27T15:43:24.333Z","etag":null,"topics":["backslash","filesystem","forwardslash","linux","macos","node","nodejs","path","posix","slash","typescript","windows"],"latest_commit_sha":null,"homepage":"https://github.com/flex-development/pathe","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flex-development.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/funding.yml","license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["flex-development"]}},"created_at":"2022-12-05T21:46:01.000Z","updated_at":"2026-02-27T10:26:18.000Z","dependencies_parsed_at":"2023-09-28T12:31:43.763Z","dependency_job_id":"334e9f45-d048-4a98-8267-3665306e6c5e","html_url":"https://github.com/flex-development/pathe","commit_stats":{"total_commits":373,"total_committers":3,"mean_commits":"124.33333333333333","dds":"0.42627345844504017","last_synced_commit":"16cafca748ad6f33058b704e4ddd3a668271a51e"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/flex-development/pathe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flex-development%2Fpathe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flex-development%2Fpathe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flex-development%2Fpathe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flex-development%2Fpathe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flex-development","download_url":"https://codeload.github.com/flex-development/pathe/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flex-development%2Fpathe/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30283888,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T02:57:19.223Z","status":"ssl_error","status_checked_at":"2026-03-09T02:56:26.373Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backslash","filesystem","forwardslash","linux","macos","node","nodejs","path","posix","slash","typescript","windows"],"created_at":"2024-10-05T04:06:36.720Z","updated_at":"2026-03-09T05:31:17.588Z","avatar_url":"https://github.com/flex-development.png","language":"TypeScript","funding_links":["https://github.com/sponsors/flex-development"],"categories":[],"sub_categories":[],"readme":"# pathe\n\n[![github release](https://img.shields.io/github/v/release/flex-development/pathe.svg?include_prereleases\\\u0026sort=semver)](https://github.com/flex-development/pathe/releases/latest)\n[![npm](https://img.shields.io/npm/v/@flex-development/pathe.svg)](https://npmjs.com/package/@flex-development/pathe)\n[![codecov](https://codecov.io/gh/flex-development/pathe/branch/main/graph/badge.svg?token=R2TPEBGWXB)](https://codecov.io/gh/flex-development/pathe)\n[![license](https://img.shields.io/github/license/flex-development/pathe.svg)](LICENSE.md)\n[![conventional commits](https://img.shields.io/badge/-conventional%20commits-fe5196?logo=conventional-commits\\\u0026logoColor=ffffff)](https://conventionalcommits.org)\n[![typescript](https://img.shields.io/badge/-typescript-3178c6?logo=typescript\\\u0026logoColor=ffffff)](https://typescriptlang.org)\n[![vitest](https://img.shields.io/badge/-vitest-6e9f18?style=flat\\\u0026logo=vitest\\\u0026logoColor=ffffff)](https://vitest.dev)\n[![yarn](https://img.shields.io/badge/-yarn-2c8ebb?style=flat\\\u0026logo=yarn\\\u0026logoColor=ffffff)](https://yarnpkg.com)\n\nUniversal drop-in replacement for [`node:path`][node-path]\n\n## Contents\n\n- [What is this?](#what-is-this)\n- [When should I use this?](#when-should-i-use-this)\n- [Install](#install)\n- [API](#api)\n- [Types](#types)\n- [Contribute](#contribute)\n\n## What is this?\n\nThis package is a universal drop-in replacement for Node.js' [`path`][node-path] module.\n\nIt enforces consistency between POSIX and Windows operating systems and also provides additional utilities for working\nwith file URLs, paths, and extensions.\n\n## When should I use this?\n\nFor [historical reasons][historical-reasons], Windows followed MS-DOS and used backslashes (`\\`) to separate path\ncomponents, as opposed to the forwardslashes (`/`) used by POSIX operating systems. Even though Windows operating\nsystems now support both separators, there are still discrepancies between operating systems when using Node.js' `path`\nmodule:\n\n\u003e The default operation of the `node:path` module varies based on the operating system on which a Node.js application is\n\u003e running. Specifically, when running on a Windows operating system, the `node:path` module will assume that\n\u003e Windows-style paths are being used. – [*Windows vs. POSIX*][windows-vs-posix]\n\nThis package enforces consistency between operating systems by ensuring paths are POSIX-compliant. With support for both\n[drive][drive-path] and [UNC paths][unc-path] as well, platform-specific modules like\n[`node:path/posix`][node-path-posix] and [`node:path/win32`][node-path-win32] are no longer needed.\n\n\u003e ~~To achieve consistent results when working with Windows file paths on any operating system,\n\u003e use [`path.win32`][node-path-win32].~~\n\u003e ~~To achieve consistent results when working with POSIX file paths on any operating system,\n\u003e use [`path.posix`][node-path-posix].~~\n\n**To achieve consistent results when working with Windows file paths on any operating system, use `pathe`. To achieve\nconsistent results when working with POSIX file paths on any operating system, use `pathe`. \\:blush:**\n\n## Install\n\nThis package is [ESM only][esm].\n\nIn Node.js (version 18+) with [yarn][]:\n\n```sh\nyarn add @flex-development/pathe\n```\n\n\u003cblockquote\u003e\n  \u003csmall\u003e\n    See \u003ca href='https://yarnpkg.com/protocol/git'\u003eGit - Protocols | Yarn\u003c/a\u003e\n    \u0026nbsp;for details regarding installing from Git.\n  \u003c/small\u003e\n\u003c/blockquote\u003e\n\nIn Deno with [`esm.sh`][esmsh]:\n\n```ts\nimport { parse } from 'https://esm.sh/@flex-development/pathe'\n```\n\nIn browsers with [`esm.sh`][esmsh]:\n\n```html\n\u003cscript type=\"module\"\u003e\n  import { parse } from 'https://esm.sh/@flex-development/pathe'\n\u003c/script\u003e\n```\n\n## Use\n\n```ts\nimport {\n  addExt,\n  basename,\n  changeExt,\n  cwd,\n  delimiter,\n  dirname,\n  dot,\n  extToValue,\n  extname,\n  fileURLToPath,\n  format,\n  formatExt,\n  isAbsolute,\n  isDeviceRoot,\n  isSep,\n  isURL,\n  join,\n  matchesGlob,\n  normalize,\n  parse,\n  pathToFileURL,\n  relative,\n  removeExt,\n  resolve,\n  resolveWith,\n  root,\n  sep,\n  toNamespacedPath,\n  toPath,\n  toPosix\n} from '@flex-development/pathe'\n```\n\n## API\n\nThis package exports the following identifiers:\n\n- [`addExt`](./src/lib/add-ext.mts)\n- [`basename`](./src/lib/basename.mts)\n- [`changeExt`](./src/lib/change-ext.mts)\n- [`cwd`](./src/lib/cwd.mts)\n- [`delimiter`](./src/lib/delimiter.mts)\n- [`dirname`](./src/lib/dirname.mts)\n- [`dot`](./src/lib/dot.mts)\n- [`extToValue`](./src/lib/ext-to-value.mts)\n- [`extname`](./src/lib/extname.mts)\n- [`extnames`](./src/lib/extnames.mts)\n- [`fileURLToPath`](./src/lib/file-url-to-path.mts)\n- [`formatExt`](./src/lib/format-ext.mts)\n- [`format`](./src/lib/format.mts)\n- [`isAbsolute`](./src/lib/is-absolute.mts)\n- [`isDeviceRoot`](./src/lib/is-device-root.mts)\n- [`isSep`](./src/lib/is-sep.mts)\n- [`isURL`](./src/lib/is-url.mts)\n- [`join`](./src/lib/join.mts)\n- [`matchesGlob`](./src/lib/matches-glob.mts)\n- [`normalize`](./src/lib/normalize.mts)\n- [`parse`](./src/lib/parse.mts)\n- [`pathToFileURL`](./src/lib/path-to-file-url.mts)\n- [`posix`](./src/pathe.mts)\n- [`relative`](./src/lib/relative.mts)\n- [`removeExt`](./src/lib/remove-ext.mts)\n- [`resolveWith`](./src/lib/resolve-with.mts)\n- [`resolve`](./src/lib/resolve.mts)\n- [`root`](./src/lib/root.mts)\n- [`sep`](./src/lib/sep.mts)\n- [`toNamespacedPath`](./src/lib/to-namespaced-path.mts)\n- [`toPath`](./src/lib/to-path.mts)\n- [`toPosix`](./src/lib/to-posix.mts)\n- [`win32`](./src/pathe.mts)\n\nThe default export is `pathe`.\n\n\u003e Documentation website coming soon.\n\n## Types\n\nThis package is fully typed with [TypeScript][].\n\n- [`Cwd`](src/types/cwd.mts)\n- [`Delimiter`](src/types/delimiter.mts)\n- [`DeviceRoot`](src/types/device-root.mts)\n- [`Dot`](src/types/dot.mts)\n- [`DriveLetter`](src/types/drive-letter.mts)\n- [`EmptyString`](src/types/empty-string.mts)\n- [`Ext`](src/types/ext.mts)\n- [`FormatInputPathObject`](src/interfaces/format-input-path-object.mts)\n- [`ParsedPath`](src/interfaces/parsed-path.mts)\n- [`Pathe`](src/interfaces/pathe.mts)\n- [`PlatformOptions`](src/interfaces/platform-options.mts)\n- [`PlatformPath`](src/interfaces/platform-path.mts)\n- [`PosixDelimiter`](src/types/delimiter-posix.mts)\n- [`PosixPlatformPath`](src/interfaces/platform-path-posix.mts)\n- [`PosixSep`](src/types/sep-posix.mts)\n- [`Sep`](src/types/sep.mts)\n- [`WindowsDelimiter`](src/types/delimiter-windows.mts)\n- [`WindowsPlatformPath`](src/interfaces/platform-path-windows.mts)\n- [`WindowsSep`](src/types/sep-windows.mts)\n\n## Contribute\n\nSee [`CONTRIBUTING.md`](CONTRIBUTING.md).\n\nThis project has a [code of conduct](./CODE_OF_CONDUCT.md). By interacting with this repository, organization, or\ncommunity you agree to abide by its terms.\n\n[drive-path]: https://learn.microsoft.com/windows/win32/fileio/naming-a-file#naming-conventions\n\n[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n\n[esmsh]: https://esm.sh\n\n[historical-reasons]: https://learn.microsoft.com/archive/blogs/larryosterman/why-is-the-dos-path-character\n\n[node-path-posix]: https://nodejs.org/api/path.html#pathposix\n\n[node-path-win32]: https://nodejs.org/api/path.html#pathwin32\n\n[node-path]: https://nodejs.org/api/path.html\n\n[typescript]: https://www.typescriptlang.org\n\n[unc-path]: https://learn.microsoft.com/dotnet/standard/io/file-path-formats#unc-paths\n\n[windows-vs-posix]: https://nodejs.org/api/path.html#windows-vs-posix\n\n[yarn]: https://yarnpkg.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflex-development%2Fpathe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflex-development%2Fpathe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflex-development%2Fpathe/lists"}