cross-paths
Advanced tools
Comparing version 1.0.2 to 1.0.4
17
index.js
@@ -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 = { |
{ | ||
"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" | ||
} | ||
} |
@@ -13,2 +13,4 @@ | ||
![separator](assets/separate.jpg) | ||
- **Simple**: extremely simple to use | ||
@@ -19,4 +21,2 @@ - **Darwin to Win32**: Convert your darwin based operating system paths to Windows operating system | ||
![separator](assets/separate.jpg) | ||
<br> | ||
@@ -23,0 +23,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4241
39
2
+ Addedlog-symbols@^4.1.0
+ Addedansi-styles@4.3.0(transitive)
+ Addedchalk@4.1.2(transitive)
+ Addedcolor-convert@2.0.1(transitive)
+ Addedcolor-name@1.1.4(transitive)
+ Addedhas-flag@4.0.0(transitive)
+ Addedis-unicode-supported@0.1.0(transitive)
+ Addedlog-symbols@4.1.0(transitive)
+ Addedsupports-color@7.2.0(transitive)