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

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

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'
```