https://github.com/rmlzy/filename-to-url
Convert a filename to a valid URL
https://github.com/rmlzy/filename-to-url
Last synced: about 2 months ago
JSON representation
Convert a filename to a valid URL
- Host: GitHub
- URL: https://github.com/rmlzy/filename-to-url
- Owner: rmlzy
- License: mit
- Created: 2021-10-14T02:46:18.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-10-14T02:52:14.000Z (over 3 years ago)
- Last Synced: 2025-04-09T23:49:59.708Z (about 2 months ago)
- Language: JavaScript
- Homepage: https://npmjs.com/filename-to-url
- Size: 87.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This package will remove unsafe characters(`<>"#%{}|\^~[]‘`) and reserved characters(`;/?:@=&`).
## Getting Started
```bash
npm i --save filename-to-url
``````javascript
import { filenameToUrl } from "filename-to-url";const legalName = filenameToUrl("统计报告@李四.xls");
console.log(legalName); // => output: 统计报告李四.xls
```## License
[MIT](./LICENSE)