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

cssc

v0.0.1

Published

CSSC — CSS counter

Downloads

1

Readme

1. Introduction

CSSC

Please report issues on [Github] (https://github.com/afelix/cssc/issues).

For feedback, suggestions, etc. write to skryzhanovsky@ya.ru.

2. Installation

2.1. Prerequisites

  • for command line use: Linux / Mac OS X / any OS with working Node.js

2.2. Install using git

Prerequisites:

To install:

  • run git clone git://github.com/afelix/cssc.git

2.3. Install using npm

Prerequisites:

To install (global):

  • run npm install cssc -g

To update:

  • run npm update cssc

To uninstall:

  • run npm uninstall cssc

3. Usage

3.1. From the command line

Run bin/cssc (when installed from git), you will need to have nodejs 0.4.x or newer installed — http://nodejs.org

Run cssc (when installed from npm).

Usage:

cssc
    shows usage information
cssc <filename>
    counts CSS tokens in <filename> and outputs the result to stdout
cssc <in_filename> <out_filename>
cssc -i <in_filename> -o <out_filename>
cssc --input <in_filename> --output <out_filename>
    counts CSS tokens in <in_filename> and outputs the result to <out_filename>
cssc -h
cssc --help
    shows usage information
cssc -v
cssc --version
    shows the version number

Example:

$ echo ".foo { p: v } .foo, .bar + .car { p: v }" > test.css
$ cssc test.css
Total selector groups: 2
Total simple selectors: 3
Total unique simple selectors: 2

4. Statistics (in a nutshell)

Sample CSS:

.foo {
    p: v
}
.foo, .bar + .car {
    p: v
}

Here:

  • .foo and .bar + .car are so called simple selectors;
  • .bar + .car is selector group.

So in resulting statistics you will see:

  • 2 selector groups — .foo and .foo, .bar + .car;
  • 3 simple selectors — .foo, .foo and .foo, .bar + .car;
  • 2 unique simple selectors — .foo and .bar + .car.

5. Authors

6. And finally

  • CSSC is licensed under MIT