1.2.0 • Published 5 months ago

als-path-validator v1.2.0

Weekly downloads
-
License
ISC
Repository
-
Last release
5 months ago

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 '/' | '\' |''
1.2.0

5 months ago

1.1.0

5 months ago

1.0.0

6 months ago