{"id":29275835,"url":"https://github.com/peterroe/lang-icons","last_synced_at":"2025-07-05T07:11:19.286Z","repository":{"id":227685387,"uuid":"772147186","full_name":"peterroe/lang-icons","owner":"peterroe","description":"Infer and get svg icon from file name or folder name","archived":false,"fork":false,"pushed_at":"2025-07-05T04:04:16.000Z","size":103,"stargazers_count":1,"open_issues_count":11,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-05T05:19:25.719Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/peterroe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-03-14T16:14:07.000Z","updated_at":"2024-03-14T17:27:54.000Z","dependencies_parsed_at":"2025-05-31T17:23:06.564Z","dependency_job_id":"e04a64de-515c-496b-82fd-bb426ad56bef","html_url":"https://github.com/peterroe/lang-icons","commit_stats":null,"previous_names":["peterroe/lang-icons"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/peterroe/lang-icons","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterroe%2Flang-icons","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterroe%2Flang-icons/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterroe%2Flang-icons/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterroe%2Flang-icons/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peterroe","download_url":"https://codeload.github.com/peterroe/lang-icons/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterroe%2Flang-icons/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263699785,"owners_count":23497963,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-05T07:11:18.440Z","updated_at":"2025-07-05T07:11:19.269Z","avatar_url":"https://github.com/peterroe.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## lang-icons\n\nInfer and get svg icon from file name or folder name\n\n## Usage\n\n```bash\n$ pnpm i lang-icons\n```\n\n```ts\nimport { getIconByFile, getIconByFolder } from 'lang-icons/material'\n\nconsole.log(getIconByFile('vite.config.ts'))\n/** \u003csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\"\u003e\u003cpath d=\"M10,2V18h4V30l9-16H17L22,2Z\" style=\"fill: #ffab00\"/\u003e\u003c/svg\u003e */\n\nconsole.log(getIconByFile('foo.ts'))\n/** \u003csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\"\u003e\u003cpath d=\"M28,2H4A2,2,0,0,0,2,4V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V4A2,2,0,0,0,28,2ZM16,28H14V18H10V16H20v2H16Zm4-1.7627,1.43262-1.418a3.55568,3.55568,0,0,0,2.14648,1.13385c1.74371.12848,2.80634-.1449,2.33789-1.84186-1.58563-1.062-3.66-1.5705-5.13348-2.7984A3.185,3.185,0,0,1,20,19.25a3.69011,3.69011,0,0,1,.57532-2.03827c1.3789-1.80469,4.827-1.07111,4.86218-1.06232a4.26278,4.26278,0,0,1,2.24609,1.49707l-1.4414,1.39063a2.45461,2.45461,0,0,0-1.27832-.94434,4.38167,4.38167,0,0,0-2.79908.2688.354.354,0,0,0-.10723.17023,2.56,2.56,0,0,0,.02185,1.1654.55425.55425,0,0,0,.20166.27167c1.48309,1.14575,4.70575,1.738,5.48553,3.3739A4.705,4.705,0,0,1,28,24.94135C27.928,28.66132,22.17737,28.8291,20,26.2373Z\" style=\"fill: #0288d1\"/\u003e\u003c/svg\u003e */\n\nconsole.log(getIconByFolder('src'))\n/** \u003csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 32 32\"\u003e\u003cpath d=\"M13.84376,7.53645l-1.28749-1.0729A2,2,0,0,0,11.27591,6H4A2,2,0,0,0,2,8V24a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2H15.12412A2,2,0,0,1,13.84376,7.53645Z\" style=\"fill: #4caf50\"/\u003e\u003cpath d=\"M18.43481,30a1.07457,1.07457,0,0,1-.23744-.02778,1.13739,1.13739,0,0,1-.82864-1.32282L20.462,12.9053a1.1305,1.1305,0,0,1,.5072-.744,1.05715,1.05715,0,0,1,.79956-.13429,1.13886,1.13886,0,0,1,.82864,1.32436l-3.10134,15.7441a1.12409,1.12409,0,0,1-.504.74244A1.05491,1.05491,0,0,1,18.43481,30Zm6.20106-2h-.07753a1.07492,1.07492,0,0,1-.76241-.41213A1.164,1.164,0,0,1,23.909,26.0397l5.31911-4.9671-5.2965-4.6229a1.1647,1.1647,0,0,1-.16153-1.54354,1.07957,1.07957,0,0,1,.75434-.43682,1.05763,1.05763,0,0,1,.80925.25777L31.57834,20.182a1.1563,1.1563,0,0,1,.00323,1.72259L25.36274,27.7129a1.06859,1.06859,0,0,1-.72849.28864ZM15.3254,28a1.07162,1.07162,0,0,1-.72849-.29173L8.37162,21.89685a1.159,1.159,0,0,1-.0099-1.69172l.01959-.01853,6.24629-5.45332a1.03545,1.03545,0,0,1,.79956-.26086,1.08079,1.08079,0,0,1,.75918.43682,1.16473,1.16473,0,0,1-.15991,1.54663l-5.29327,4.61981,5.31912,4.964a1.15611,1.15611,0,0,1,.11307,1.54817A1.07173,1.07173,0,0,1,15.40293,28Z\" style=\"fill: #c8e6c9\"/\u003e\u003c/svg\u003e */\n```\n\n\u003cp\u003e\n  \u003cimg src=\"https://cdn.jsdelivr.net/gh/PKief/vscode-material-icon-theme@master/icons/vite.svg\" width=50 /\u003e\n  \u003cimg src=\"https://cdn.jsdelivr.net/gh/PKief/vscode-material-icon-theme@master/icons/typescript.svg\" width=50 /\u003e\n  \u003cimg src=\"https://cdn.jsdelivr.net/gh/PKief/vscode-material-icon-theme@master/icons/folder-src.svg\" width=50 /\u003e\n\u003c/p\u003e\n\n**Default Icon**\n\n```ts\nimport { getIconByFile, getIconByFolder } from 'lang-icons/material'\n\nconsole.log(getIconByFile('foo'))\n/** \u003csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"\u003e\u003cpath fill=\"#8699a3\" d=\"M4 20q-.825 0-1.412-.587T2 18V6q0-.825.588-1.412T4 4h6l2 2h8q.825 0 1.413.588T22 8v10q0 .825-.587 1.413T20 20z\"/\u003e\u003c/svg\u003e */\n\nconsole.log(getIconByFolder('bar'))\n/** \u003csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 256 256\"\u003e\u003cpath fill=\"#8699a3\" d=\"m210.83 85.17l-56-56A4 4 0 0 0 152 28H56a12 12 0 0 0-12 12v176a12 12 0 0 0 12 12h144a12 12 0 0 0 12-12V88a4 4 0 0 0-1.17-2.83M156 41.65L198.34 84H156ZM200 220H56a4 4 0 0 1-4-4V40a4 4 0 0 1 4-4h92v52a4 4 0 0 0 4 4h52v124a4 4 0 0 1-4 4\"/\u003e\u003c/svg\u003e */\n```\n\n\u003cp\u003e\n  \u003cimg src=\"./public/file.svg\" width=50 /\u003e\n  \u003cimg src=\"./public/folder.svg\" width=50 /\u003e\n\u003c/p\u003e\n\n## Roadmap\n\nMore icon set support\n\n```ts\nimport { getIconByFile, getIconByFolder } from 'lang-icons/xxx'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterroe%2Flang-icons","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeterroe%2Flang-icons","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterroe%2Flang-icons/lists"}