https://github.com/peterroe/lang-icons
Infer and get svg icon from file name or folder name
https://github.com/peterroe/lang-icons
Last synced: 11 months ago
JSON representation
Infer and get svg icon from file name or folder name
- Host: GitHub
- URL: https://github.com/peterroe/lang-icons
- Owner: peterroe
- License: mit
- Created: 2024-03-14T16:14:07.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-07-05T04:04:16.000Z (11 months ago)
- Last Synced: 2025-07-05T05:19:25.719Z (11 months ago)
- Language: TypeScript
- Homepage:
- Size: 101 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## lang-icons
Infer and get svg icon from file name or folder name
## Usage
```bash
$ pnpm i lang-icons
```
```ts
import { getIconByFile, getIconByFolder } from 'lang-icons/material'
console.log(getIconByFile('vite.config.ts'))
/** */
console.log(getIconByFile('foo.ts'))
/** */
console.log(getIconByFolder('src'))
/** */
```
**Default Icon**
```ts
import { getIconByFile, getIconByFolder } from 'lang-icons/material'
console.log(getIconByFile('foo'))
/** */
console.log(getIconByFolder('bar'))
/** */
```
## Roadmap
More icon set support
```ts
import { getIconByFile, getIconByFolder } from 'lang-icons/xxx'
```