https://github.com/yracnet/slash-path
https://github.com/yracnet/slash-path
Last synced: 16 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/yracnet/slash-path
- Owner: yracnet
- License: mit
- Created: 2023-09-01T22:58:12.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-12-25T21:20:09.000Z (10 months ago)
- Last Synced: 2025-08-09T16:24:16.033Z (2 months ago)
- Language: TypeScript
- Size: 29.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# slash-path
## Motivation
It's good or bad practice, but we need to compose file paths uniformly, I need to ignore Windows backslash and adopt Linux forward slash to compose paths to system files and resources.
## Description
This library wraps the routes library and exposes the same methods with the slash method, to use slash as the default separator.
## Example
```js
// import path from "path";
import path from "slash-path";const filePath = path.resolve("./file.txt");
console.log("path: ", filePath);
// output
// path: c:/path/to/ptoject/file.txt
```