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 🙏

© 2024 – Pkg Stats / Ryan Hefner

cs-tierlist

v1.2.2

Published

Tierlists for many pattern-based CS skins

Downloads

34

Readme

CS Tierlist

NPM Version NPM Bundle Size NPM Downloads GitHub License GitHub Build Workflow Status GitHub Test Workflow Status

Tierlists for many pattern-based CS skins. The list of supported skins and weapons is listed below.

This repository contains pre-generated tierlists in the generated folder and a NPM package as small wrapper for quick and simple usage in JavaScript/TypeScript projects.

📦 Credits

This repository is only a public data collection. I did not create the tierlists myself, credit goes to their original creators. The full guides and tierlists can be found here:

After careful consideration, I decided to accept the following proposed changes to the original tierlists:

  • CW Gloves
    • pattern 369 has been moved from tier 2 right hand to tier 3 double web thanks to a suggestion by @zada273 in Issue #1
    • pattern 936 has been added as a tier 2 double web thanks to a suggestion by @zada273 in Issue #1
    • pattern 813 has been added as a tier 3 double web thanks to a suggestions by @ALPHABRAVOK9 on Twitter

⚙️ Usage

JavaScript/TypeScript (NPM)

Install the latest version for Node.js 18 as NPM package:

npm install cs-tierlist

Use the package in your own project and only import what you actually need:

// import the desired package
const { CrimsonM9Mapping, CyanbitKarambitMapping } = require('cs-tierlist');

// you can also dynamically generate the mapping
// this allows for enforced preloading of the tierlist
const cw_kara_mapping = generateMapping('karambit', 'crimson_web', true);

// Get the pattern for a specific seed
const pattern2 = CrimsonM9Mapping.getPattern(2);

// Get the all patterns
const patterns = CyanbitKarambitMapping.getAllPatterns();

Other languages

This repository contains pre-generated tierlists in the generated folder. For example, the tierlist for the M9 Bayonet knives is located at generated/crimson_web_m9.json. Github provides raw links for each file in the repository without CORS restrictions.

Example in Python:

# import the requests library
import requests

# download the tierlist
m9_cw_tierlist = requests.get("https://raw.githubusercontent.com/godrums/cs-tierlist/main/generated/crimson_web_m9.json").json()

# get the pattern for a specific seed
pattern2 = m9_cw_tierlist["2"]

🗎 Raw Tierlist Format

When using the raw JSON-files, the format is as follows:

{
    [paint_seed: string]: {
        img?: string, // Optional Steam URL to the image
        type: string, // Type of the tier, e.g. "Double Web"
        tier: number, // Tier of the pattern, e.g. 1
        rank?: number, // Optional Rank of the pattern, e.g. 1
    }
}

📝 Contributing

If you want to contribute to this repository, feel free to open a pull request. Please make sure to follow the existing structure and use the same format for the tierlists.

For new tierlists, it is required to submit at least one test-file under __tests__\modules for each tierlist and to include the test results in the pull request.

⌨️ Development

Prerequisites:

  • Node.js >=18.0.0
  • npm >=9.5.0
  • tsc >=4.7.0

Note that this project will not run on older versions of Node.js due to the usage of ES2022 features, such as the fetch-functionality.

Prepare your local setup via the following command:

npm install

After finishing your changes, make sure to format with Prettier:

npm run prettier

Clean the build folder and then build the project:

npm run clean
npm run build

And finally make sure the tests suites are passing:

npm run test