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

@hasagi/ingame-api

v0.2.2

Published

A typed wrapper around the League of Legends **Live Client Data API** (the in-game API served at `https://127.0.0.1:2999` during an active match), enhanced with a higher-level **Event API** that polls the live data and emits semantic game events.

Downloads

336

Readme

@hasagi/ingame-api

A typed wrapper around the League of Legends Live Client Data API (the in-game API served at https://127.0.0.1:2999 during an active match), enhanced with a higher-level Event API that polls the live data and emits semantic game events.

Extracted from @hasagi/extended and focused on in-game data.

Installation

npm install @hasagi/ingame-api

Quick start

import { IngameAPI } from "@hasagi/ingame-api";

IngameAPI.on("game-started", () => console.log("Game started!"));
IngameAPI.on("dragon-killed", (event) => console.log("Dragon killed:", event));
IngameAPI.on("champion-killed", (event) => console.log(`${event.KillerName} killed ${event.VictimName}`));

// Waits for the live client to be available, then starts polling for events.
await IngameAPI.startEventAPI({ pollIntervalMs: 1000 });

// later…
IngameAPI.stopEventAPI();

Event API

startEventAPI(options?) waits for the live client to become available and then polls it on an interval, emitting an event whenever something new happens. Polls never overlap — the next poll is scheduled only after the current one resolves.

await IngameAPI.startEventAPI({
  timeout: 30000,      // max time to wait for the live client (default: 30s)
  pollIntervalMs: 1000, // poll interval (default: 1000ms)
  cert: undefined,      // omit: use the bundled Riot cert; string: trust it; null: disable TLS validation
});

Emitted events

started, stopped, event (every raw event), error, game-started, minions-spawning, first-turret-destroyed, turret-destroyed, inhibitor-destroyed, inhibitor-respawned, dragon-killed, void-grub-killed, herald-killed, baron-killed, champion-killed, multikill, ace, game-ended.

The API stops automatically after repeated request failures (e.g. when the game ends).

Disclaimer

Hasagi is not endorsed by Riot Games and does not reflect the views or opinions of Riot Games or anyone officially involved in producing or managing Riot Games properties. Riot Games and all associated properties are trademarks or registered trademarks of Riot Games, Inc.