cross-paths
Advanced tools
+15
-2
@@ -8,2 +8,3 @@ /** | ||
| const logSymbols = require('log-symbols'); | ||
| const nodePath = require('path'); | ||
@@ -18,3 +19,9 @@ const { toUnix } = require('upath'); | ||
| */ | ||
| const darwinToWin32 = path => nodePath.win32.normalize(path); | ||
| const darwinToWin32 = path => { | ||
| if (!path) { | ||
| console.log(`${logSymbols.error} Please provide a valid path`); | ||
| return null; | ||
| } | ||
| return nodePath.win32.normalize(path); | ||
| }; | ||
@@ -27,3 +34,9 @@ /** | ||
| */ | ||
| const win32ToDarwin = path => toUnix(path); | ||
| const win32ToDarwin = path => { | ||
| if (!path) { | ||
| console.log(`${logSymbols.error} Please provide a valid path`); | ||
| return null; | ||
| } | ||
| return toUnix(path); | ||
| }; | ||
@@ -30,0 +43,0 @@ module.exports = { |
+2
-1
| { | ||
| "name": "cross-paths", | ||
| "version": "1.0.2", | ||
| "version": "1.0.4", | ||
| "description": "Converts paths from darwin to win32 platform and vice versa", | ||
@@ -35,4 +35,5 @@ "repository": "https://github.com/msaaddev/cross-paths", | ||
| "dependencies": { | ||
| "log-symbols": "^4.1.0", | ||
| "upath": "^2.0.1" | ||
| } | ||
| } |
+2
-2
@@ -13,2 +13,4 @@ | ||
|  | ||
| - **Simple**: extremely simple to use | ||
@@ -19,4 +21,2 @@ - **Darwin to Win32**: Convert your darwin based operating system paths to Windows operating system | ||
|  | ||
| <br> | ||
@@ -23,0 +23,0 @@ |
4241
7.39%39
50%2
100%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added