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

@zomlit/tsleague

v1.0.0

Published

RL wrapper in TypeScript

Readme

Getting Started

Read this Getting Started tutorial to set up your project.

⏳ Installation

Install TSLeague:

npm install

Edit Proxies:

  • Edit src/proxy/ProxyManager.ts to setup http proxies.

Setup Steam API Key:

  • Edit src/steam/SteamAPI.ts to setup your Steam API.

Steam API Key is required if you want to check steam accounts

Enjoy, everything is done 🎉

Supported operating systems:

  • Ubuntu LTS/Debian 9.x
  • Windows 10/11

(Please note that TSLeague may work on other operating systems, but these are not tested nor officially supported at this time.)

Node:

TSLeague only supports maintenance and LTS versions of Node.js. Please refer to the Node.js release schedule for more information. NPM versions installed by default with Node.js are supported. Generally it's recommended to use yarn over npm where possible.

| TSLeague Version | Recommended | Minimum | | ---------------- | ----------- | ------- | | 1.0 and up | 20.x | 18.x |

License

See the LICENSE file for licensing information.

Example Usage

Here's a basic example of how to use the Rocket League API:

Specific Season:

// Example for a specific season
const api = new RocketLeagueAPI({
    season: Season.SEASON_28,
    accountType: AccountType.EPIC,
    username: 'SomePlayer',
})

async function getSeasonStats() {
    const data = await api.fetchData()
    if (!data) {
        this.logger.error('Error loading data.')
        return
    }

    try {
        // Season 28 Stats for Ranked Doubles 2v2
        const seasonStats = await api.getStats(Playlist.RANKED_DOUBLES_2V2)
        if (seasonStats) {
            this.logger.log(`Rank: ${seasonStats.getRank()}`)
            this.logger.log(`Division: ${currentSeasonStats.getDivision()}`)
            this.logger.log(`Division Up: ${currentSeasonStats.getDivisionUp()}`)
            this.logger.log(`Division Down: ${currentSeasonStats.getDivisionDown()}`)
            this.logger.log(`Rating: ${seasonStats.getMMR()}`)
            this.logger.log(`Peak Rating: ${seasonStats.getPeak()}`)
            this.logger.log(`Matches Played: ${seasonStats.getMatchesPlayed()}`)
            this.logger.log(`Win Streak: ${seasonStats.getStreak()}`)
        }
    } catch (error) {
        this.logger.error('Error fetching stats:', error)
    }
}

Current Season:

// Example for the current season
const api = new RocketLeagueAPI({
    accountType: AccountType.EPIC,
    username: 'SomePlayer',
})

async function getCurrentSeasonStats() {
    const data = await api.fetchData()
    if (!data) {
        this.logger.error('Error loading data.')
        return
    }

    try {
        // Current Season Stats for Ranked Doubles 2v2
        const currentSeasonStats = await api.getStats(Playlist.RANKED_DOUBLES_2V2)
        if (currentSeasonStats) {
            this.logger.log(`Rank: ${currentSeasonStats.getRank()}`)
            this.logger.log(`Division: ${currentSeasonStats.getDivision()}`)
            this.logger.log(`Division Up: ${currentSeasonStats.getDivisionUp()}`)
            this.logger.log(`Division Down: ${currentSeasonStats.getDivisionDown()}`)
            this.logger.log(`Rating: ${currentSeasonStats.getMMR()}`)
            this.logger.log(`Peak Rating: ${currentSeasonStats.getPeak()}`)
            this.logger.log(`Matches Played: ${currentSeasonStats.getMatchesPlayed()}`)
            this.logger.log(`Win Streak: ${currentSeasonStats.getStreak()}`)
        }
    } catch (error) {
        this.logger.error('Error fetching stats:', error)
    }
}

Global Stats: Here's a basic example of how to get the global stats:

Warning: use current season for fetch global stats

// Example for the global stats
const api = new RocketLeagueAPI({
    accountType: AccountType.EPIC,
    username: 'SomePlayer',
})

async function getGlobalStats() {
    const data = await api.fetchData()
    if (!data) {
        this.logger.error('Error loading data.')
        return
    }

    try {
        // Global Stats
        const globalStats = await api.getGlobalStats()
        if (globalStats) {
            this.logger.log(`Season Reward: ${globalStats.getSeasonReward()}`) //Rank name: Supersonic Legend
            this.logger.log(`Season Reward Icon: ${globalStats.getSeasonRewardIcon()}`) //Rank Icon
            this.logger.log(`Wins: ${globalStats.getTotalWins()}`)
            this.logger.log(`Shots: ${globalStats.getTotalShots()}`)
            this.logger.log(`Goals: ${globalStats.getTotalGoals()}`)
            this.logger.log(`Saves: ${globalStats.getTotalSaves()}`)
            this.logger.log(`Assists: ${globalStats.getTotalAssists()}`)
            this.logger.log(`MVPs: ${globalStats.getTotalMVPs()}`)
            this.logger.log(`Goal Shot Ratio: ${globalStats.getGoalShotRatio()}`)
        }
    } catch (error) {
        this.logger.error('Error fetching stats:', error)
    }
}