path-to-posix
v1.0.3
Published
Convert any filesystem path to POSIX format by replacing platform-specific separators with forward slashes
Maintainers
Readme
path-to-posix
Canonical URL:
https://alexstevovich.com/a/path-to-posix-nodejs
Canonical URL:
https://midnightcitylights.com/software/path-to-posix-nodejs
A tiny utility that converts system-specific file paths into POSIX format by replacing backslashes with forward slashes. Perfect for cross-platform Node.js projects.
Installation
npm install path-to-posixExample
import pathToPosix from 'path-to-posix';
console.log(pathToPosix('C:\\ExampleFolder\\MyTxts\\file.txt'));
// → "C:/ExampleFolder/MyTxts/file.txt"License
Licensed under the MIT License.
