An open API service indexing awesome lists of open source software.

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

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)