https://github.com/fabiospampinato/unsanitize-basename
Unsanitize a file name, the inverse of the "sanitize-basename" library.
https://github.com/fabiospampinato/unsanitize-basename
basename file name sanitize unsanitize
Last synced: 4 months ago
JSON representation
Unsanitize a file name, the inverse of the "sanitize-basename" library.
- Host: GitHub
- URL: https://github.com/fabiospampinato/unsanitize-basename
- Owner: fabiospampinato
- License: mit
- Created: 2019-10-09T22:54:56.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2025-01-17T18:38:59.000Z (over 1 year ago)
- Last Synced: 2025-09-20T21:46:44.803Z (9 months ago)
- Topics: basename, file, name, sanitize, unsanitize
- Language: TypeScript
- Homepage:
- Size: 11.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# Unsanitize Basename
Unsanitize a file name, the inverse of the "[`sanitize-basename`](https://github.com/fabiospampinato/sanitize-basename)" library.
It tries to restore the original forbidden characters that have been replaced by [`sanitize-basename`](https://github.com/fabiospampinato/sanitize-basename).
## Install
```sh
npm install unsanitize-basename
```
## Usage
```ts
import unsanitize from 'unsanitize-basename';
// Let's unsanitize a file name
unsanitize ( '‹›꞉ˮ⁄∖ǀʔ⁎.txt' ); // => '<>:"/\\|?*.txt'
```
## Related
- [`sanitize-basename`](https://github.com/fabiospampinato/sanitize-basename): Sanitize a file name for cross-platform validity, the inverse of this library.
## License
MIT © Fabio Spampinato