Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/msaaddev/cross-paths
‼️ Convert your paths from darwin to win32 and vice versa
https://github.com/msaaddev/cross-paths
nodejs path-converter paths unix win32
Last synced: 3 days ago
JSON representation
‼️ Convert your paths from darwin to win32 and vice versa
- Host: GitHub
- URL: https://github.com/msaaddev/cross-paths
- Owner: msaaddev
- License: mit
- Created: 2021-07-09T18:25:05.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-07-23T13:46:05.000Z (over 3 years ago)
- Last Synced: 2024-11-03T07:32:09.829Z (12 days ago)
- Topics: nodejs, path-converter, paths, unix, win32
- Language: JavaScript
- Homepage: https://twitter.com/msaaddev
- Size: 56.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Changelog: changelog.md
- Contributing: contributing.md
- License: LICENSE
- Code of conduct: code-of-conduct.md
Awesome Lists containing this project
README
‼️ cross-paths
A simple path conversion package to convert your paths across different platform![separator](assets/separate.jpg)
- **Simple**: extremely simple to use
- **Darwin to Win32**: Convert your darwin based operating system paths to Windows operating system
- **Win32 to Darwin**: Convert your Windows paths to darwin based operating system
- **MIT Licensed**: Free to use for personal and commercial projects
## Installation
```sh
# install the package
npm install cross-paths
```
## API
- darwinToWin32()
- win32ToDarwin()
- path (required)
## Usage
- Convert darwin paths to win32
```js
const { darwinToWin32 } = require('cross-paths');const path = `/Users/saadirfan/GitHub`
const win32Path = darwinToWin32(path); // new windows path
```- Convert win32 to darwin paths
```js
const { win32ToDarwin } = require('cross-paths');const path = `C:\\Users\\Saad\\GitHub`;
const darwinPath = win32ToDarwin(path); // new darwin path
```
## ⚡️ Other Projects
I have curated a [detailed list](https://github.com/msaaddev/open-source) of all the open-source projects I have authored. Do take out a moment and take a look.
## 🔑 License & Conduct
- MIT © [Saad Irfan](https://github.com/msaaddev)
- [Code of Conduct](https://github.com/msaaddev/cross-paths/blob/master/code-of-conduct.md)