npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

electerm-icons

v1.0.1

Published

Lightweight icon library for electerm with essential file type icons

Readme

electerm-icons

A lightweight TypeScript library providing essential file type icons, similar to vscode-icons but with a curated set of the most commonly used icons.

Features

  • 🎯 Essential Icons Only: Curated set of 48 most commonly used file type icons
  • 📦 Lightweight: Reduced from 1400+ to 48 icons (96.6% size reduction)
  • 🔧 TypeScript: Full TypeScript support with type definitions
  • 🌐 ES Modules: Modern ES module support only
  • 📁 Complete API: Same interface as vscode-icons for easy migration

Installation

npm install electerm-icons

Usage

import { 
  getIconForFile,
  getIconForFolder
} from 'electerm-icons';

// Get icon for files
console.log(getIconForFile('index.html'));      // 'file_type_html.svg'
console.log(getIconForFile('script.js'));       // 'file_type_js.svg'
console.log(getIconForFile('main.py'));         // 'file_type_python.svg'
console.log(getIconForFile('unknown.xyz'));     // 'default_file.svg'

// Get icon for folders
console.log(getIconForFolder('src'));           // 'default_folder.svg'

Supported File Types

Web Development

  • HTML: .html, .htm, .xhtml
  • CSS: .css, .scss, .sass, .less
  • JavaScript: .js, .mjs, .cjs
  • TypeScript: .ts, .tsx
  • JSON: .json, .jsonc
  • XML: .xml, .xsd, .xsl

Programming Languages

  • Python: .py, .pyw, .pyc, .pyo
  • Java: .java, .class, .jar
  • C/C++: .c, .h, .cpp, .cxx, .cc, .hpp, .hxx
  • C#: .cs, .csx
  • PHP: .php, .phtml, .php3, .php4, .php5
  • Go: .go
  • Rust: .rs, .rlib
  • Ruby: .rb, .erb, .gemspec
  • Swift: .swift
  • Kotlin: .kt, .kts

Data & Configuration

  • YAML: .yaml, .yml
  • TOML: .toml
  • INI: .ini, .cfg, .conf
  • SQL: .sql, .mysql, .pgsql

Documentation

  • Markdown: .md, .markdown, .mdown

Special Files

  • package.json, package-lock.json
  • .gitignore, .gitattributes
  • Dockerfile, docker-compose.yml
  • CMakeLists.txt, Makefile
  • LICENSE, README.md

API Reference

Functions

getIconForFile(fileName: string): string

Returns the appropriate icon filename for a given file.

getIconForFolder(folderName: string): string

Returns the appropriate icon filename for a folder.

Constants

  • DEFAULT_FILE: Default file icon
  • DEFAULT_FOLDER: Default folder icon

Size Comparison

| Library | Icons | Size | Use Case | |---------|-------|------|----------| | vscode-icons | 1400+ | 7.7MB | Full IDE support | | electerm-icons | 48 | ~0.14MB | Essential files only |

Migration from vscode-icons

electerm-icons provides the same API as vscode-icons, making migration simple:

// Before (vscode-icons)
import { getIconForFile } from 'vscode-icons-js';

// After (electerm-icons)
import { getIconForFile } from 'electerm-icons';

// Same function calls work identically
const icon = getIconForFile('index.html');

Development


# Build the library
npm run build

# Run tests
npm test

# Development with watch mode
npm run dev

License

MIT © ZHAO Xudong

Contributing

Feel free to submit issues and pull requests to improve the icon selection or add missing essential file types.