# @jayfate/path

> The cross-platform `path` module. Uses `/` as the path separator for path parsing and returned values on `Windows/MacOS/Linux`.

Latest version **0.0.13** (published 2022-10-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install @jayfate/path
pnpm add @jayfate/path
yarn add @jayfate/path
bun add @jayfate/path
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.13 |
| Published | 2022-10-19 |
| First published | 2022-10-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 12.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | JayFate |
| Maintainers | jayfate |
| Keywords | path, windows |

## Links

- npm: https://www.npmjs.com/package/@jayfate/path
- Repository: https://github.com/JayFate/path
- Homepage: https://github.com/JayFate/path#readme
- Issues: https://github.com/JayFate/path/issues
- npm.io page: https://npm.io/package/@jayfate/path

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) ^2.4.0

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 0.0.13 (latest) — 2022-10-19
- 0.0.14-beta.3 (beta) — 2023-06-05
- 0.0.14-beta.2 — 2023-06-02
- 0.0.12 — 2022-10-18
- 0.0.11 — 2022-10-08
- 0.0.10 — 2022-10-06
- 0.0.9 — 2022-10-06
- 0.0.8 — 2022-10-06
- 0.0.7 — 2022-10-06
- 0.0.6 — 2022-10-04
- 0.0.5 — 2022-10-03
- 0.0.4 — 2022-10-02

## README

# @jayfate/path

跨端的 `path` 模块，在 Windows/MacOS/Linux 均以 `/` 作为路径分隔符进行路径解析及返回解析后的路径。

### 安装

安装 `@jayfate/path`

```sh
npm install -S @jayfate/path
```

### 使用

cjs:

```js
const path = require("@jayfate/path");
const os = require("os")

// win32
console.log(os.platform())

// D:/Documents/code/jayfate/test
console.log(path.resolve(__dirname, "test"));

// /
console.log(path.sep)
```

esm:

```js
import path, { resolve } from "@jayfate/path";

// /Users/jayfate/Documents/code/bbdl/bbdl/test
console.log(path.resolve("/Users/jayfate/Documents/code/bbdl/bbdl", "test"))
// /Users/jayfate/Documents/code/bbdl/bbdl/test
console.log(resolve("/Users/jayfate/Documents/code/bbdl/bbdl", "test"))
```

[反馈问题](https://github.com/JayFate/path/issues)

---
_Source: https://npm.io/package/@jayfate/path · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
