Unsanitize a file name, the inverse of the "sanitize-basename
" library.
It tries to restore the original forbidden characters that have been replaced by sanitize-basename
.
npm install unsanitize-basename
import unsanitize from 'unsanitize-basename';
// Let's unsanitize a file name
unsanitize ( '‹›꞉ˮ⁄∖ǀʔ⁎.txt' ); // => '<>:"/\\|?*.txt'
-
sanitize-basename
: Sanitize a file name for cross-platform validity, the inverse of this library.
MIT © Fabio Spampinato