qsu
Version:
qsu is a utility library that contains useful and frequently used functions. Start with your preferred language and the modern development environment.
1 lines • 200 B
JavaScript
import{getFileName as e}from"./getFileName.js";export function isValidFileName(t,i){let s;const l=e(t);return s=i?/(^\s+$)|(^\.+$)|([:/]+)/:/(^\s+$)|(^\.+$)|([<>:"/\\|?*]+)/,!s.test(l)&&l.length<=255}