als-path-validator
v1.2.0
Published
A utility to validate file paths in Node.js.
Downloads
9
Readme
als-path-validator
This Node.js module provides a utility function to validate file paths based on the operating system's maximum path length and legal filename characters.
Installation
npm install als-path-validator
Usage
const isValidPath = require('als-path-validator');
// Example usage
const path = "C:\\Program Files\\Example\\file.txt";
console.log(isValidPath(path)); // Returns true or false based on validity
DetectSlash
const detectSlash = require('als-path-validator/detect-slash');
detectSlash(filePath) // return '/' | '\' |''