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 🙏

© 2026 – Pkg Stats / Ryan Hefner

atom-file-icons

v1.0.3

Published

File specific icons for JavaScript. A port of the file-icons/atom package.

Readme

atom-file-icons

File specific icons for JavaScript. A port of the file-icons/atom package.

This package was made to replace file-icons-js (and that was the basis for it), but it is kept up to date automatically with a GitHub action, so it should never get out of sync with the master for more than a day.

Usage

To install the package, install it with npm or yarn:

npm install atom-file-icons
# or
yarn add atom-file-icons

And import either of the provided functions:

import { getIconClass, getIconClassList } from 'atom-file-icons';

And finally, you can find the provided fonts and css styles here:

// Styles
import 'atom-file-icons/dist/index.css';

// Fonts
import 'atom-file-icons/dist/fonts/devopicons.woff2';
import 'atom-file-icons/dist/fonts/file-icons.woff2';
import 'atom-file-icons/dist/fonts/fontawesome.woff2';
import 'atom-file-icons/dist/fonts/mfixx.woff2';
import 'atom-file-icons/dist/fonts/octicons.woff2';

The way the fonts and styles are bundled is up to your build tools, but all of the fonts are included as font-faces in the styles file.

API

getIconClass(name: string, opts: Options): string | null

The getIconClass method returns a string containing a joint class name to use on an element in order to make it into a file icon. It takes a set of options which can modify the resulting class:

  • colorMode: "light" | "dark" | "mono" — Each icon class contains both the icon specific class string as well as a color class string. This option determines whether the app is in light or dark mode, or if you'd rather have a monotone version of the icon.
  • isDir: boolean — This options determines whether or not the resulting icon should be for a directory, as files and directories both have their own set of icons.
  • skipFallback: boolean — Normally, this package will default the file icons to the default text file icon, or the folder icon to the default folder icon. If this option is passed and no match is found, the function will return null.

getIconClassList(name: string, opts: Options): string[] | null

This function takes the same options as getIconClass, the only difference is that instead of a single joint class name, it will return an array of all of the classes that should be used to make up the icon. If skipFallback is passed and no match is found, you will still receive null as a response.

Related