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

@magicwenli/league-fan-assets

v2.0.0

Published

Typed League of Legends asset loaders (icons, emotes, wards, loot, champions, skins) for league-fan

Readme

@magicwenli/league-fan-assets

Typed TypeScript library for loading and normalizing League of Legends client assets for league-fan.

v2 breaking change: this package no longer ships multi‑MB JSON on npm.
The npm package is a lightweight loader + types. Prebuilt JSON snapshots are published as GitHub Releases (data-v{gameVersion}).

Install

npm install @magicwenli/league-fan-assets

Quick start

import { createClient, assetUrl, splitSkinId } from "@magicwenli/league-fan-assets";

// Live CommunityDragon
const live = createClient({
  lang: "zh_cn",
  source: { kind: "cdragon", patch: "latest" },
});

const icons = await live.summonerIcons();
const champions = await live.champions();
const skins = await live.skins();

// Prebuilt snapshot from GitHub Releases
const cached = createClient({
  lang: "default",
  source: { kind: "release" }, // latest data-v* release
});

Asset categories

| Category | Description | |----------|-------------| | summoner-icons / summoner-icon-sets | Profile icons | | summoner-emotes | Emotes | | ward-skins / ward-skin-sets | Ward skins | | loot | Chest loot (filtered) | | champions | Champion summary | | skinlines | Skin lines | | universes | Universes | | skins | Full skins map (quest tiers expanded) | | added | Diff vs previous snapshot (release only) | | version | Data Dragon realm version |

Data backends

A) CommunityDragon (live)

createClient({ source: { kind: "cdragon", patch: "pbe" } })

Fetches raw CDragon JSON and applies shared transforms (path rewrite, loot filter, quest skin expansion, …).

B) GitHub Releases (prebuilt)

Daily CI builds normalized JSON and publishes data-v{version} releases.

CORS note: GitHub Release download URLs are not browser-CORS-friendly. Use source: { kind: "release" } from Node, SSR, or a proxy/CDN with CORS. For pure browser apps, prefer source: { kind: "cdragon" } (CDragon sends Access-Control-Allow-Origin: *).

Asset names are flattened (GitHub Releases are flat):

| Logical path | Release asset | |--------------|---------------| | default/summoner-icons.json | default__summoner-icons.json | | zh_cn/skins.json | zh_cn__skins.json | | manifest.json | manifest.json |

https://github.com/league-fan/league-fan-assets/releases/latest/download/default__champions.json

Also attached: league-fan-assets-data-{version}.tar.gz with nested folders.

import { releaseDataUrl } from "@magicwenli/league-fan-assets";

releaseDataUrl({ category: "skins", lang: "zh_cn", version: "15.24.1" });

Helpers

  • assetUrl(path, { patch, lang, category }) — rewrite /lol-game-data/assets/...
  • splitSkinId(id) — { champId, skinIndex }
  • getRarityUrl(rarity) / modelviewerUrl(skinId)
  • getGameVersion() — Tencent DDragon realm version

Scripts

npm test
npm run build          # library → dist/
npm run build:data     # snapshots → data/out/ (network)
npm run build:data -- --force

Versioning

| Channel | Scheme | When | |---------|--------|------| | npm lib | Semver 2.x | API changes (v2.0.0 tag) | | data | data-v15.24.1 | Game version changes (cron) |

Migration from v1 (unpkg JSON)

Before:

fetch("https://unpkg.com/@magicwenli/league-fan-assets/zh_cn/summoner-icons.json")

After:

const client = createClient({
  lang: "zh_cn",
  source: { kind: "release" }, // or cdragon
});
const icons = await client.summonerIcons();

Old v1 data-only npm versions remain on the registry for historical unpkg URLs but are no longer updated.

License

MIT. Game assets © Riot Games. This project is not endorsed by Riot.