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

enkanetwork

v3.1.1

Published

API wrapper for enka.network written on TypeScript which provides localization, caching and convenience

Readme

enkaNetwork

Node JS enka.network API wrapper written on TypeScript which provides auto-updated assets, localization, caching and convenience.

📦 Download

  • usage npm

    npm install enkanetwork --languages=EN
  • usage yarn

    yarn add enkanetwork --languages=EN
  • usage pnpm

    pnpm install enkanetwork --languages=EN
  • usage bun

    bun install enkanetwork --languages=EN

🎮 Game support

This wrapper currently supports Genshin Impact only. enka.network also serves Honkai: Star Rail (/hsr/uid/), Zenless Zone Zero (/zzz/uid/) and Arknights: Endfield, but those endpoints are not implemented here. The bundled game data is sourced from Dimbreath/AnimeGameData (master branch, ExcelBinOutput/ + TextMap/), the canonical Genshin datamine.

🖼️ Image assets & CDNs

Every icon URL is produced by a pluggable asset adapter. By default icons resolve to https://enka.network/ui/{icon}.png.

[!NOTE] enka.network only hosts images that are actually used on the site, so a freshly released icon may 404. In that case point the adapter at another CDN.

All of these mirror the same internal UI_* filenames from the game data, so only the prefix (and extension) change — no custom code needed:

| CDN | baseUrl | extension | | --- | --- | --- | | enka.network (default) | https://enka.network/ui/ | .png | | Hakush.in | https://static.nanoka.cc/gi/UI/ | .webp | | Project Amber | https://gi.yatta.moe/assets/UI/ | .png |

import { EnkaNetwork, OriginAdapter, FileSystemAdapter } from "enkanetwork";

// Use a different CDN (e.g. Hakush.in / webp)
new EnkaNetwork({
    assetAdapter: new OriginAdapter({
        baseUrl: "https://static.nanoka.cc/gi/UI/",
        extension: ".webp",
    }),
});

// Cache icons to the local filesystem (lazy download, origin fallback)
new EnkaNetwork({
    assetAdapter: new FileSystemAdapter({ directory: "./.enka-cache/ui" }),
});

// Already have a complete local mirror? Just point at it:
new EnkaNetwork({
    assetAdapter: new OriginAdapter({ baseUrl: "/root/guoba/assets/ui/" }),
});

// Bring your own: anything implementing `{ resolve(filename): string }`
new EnkaNetwork({
    assetAdapter: { resolve: (file) => `https://my.cdn/${file}.webp` },
});

The legacy uiAssetsPath option still works (it builds an OriginAdapter for you).

Warm the cache after a fetch so every referenced icon (incl. weapon.awakenIcon and the gacha/costume splash exposed as icons.gacha) lands on disk:

const user = await enka.fetchUser(uid);
await enka.assets.warm(); // awaits all pending downloads

[!WARNING] FileSystemAdapter only caches the filenames the library returns. Prefer the exposed fields (weapon.awakenIcon, icons.gacha) over string-deriving names like icon.replace(".png", "_Awaken.png") — derived names never pass through the cache. For renderers that need guaranteed-local paths, use fallbackToOrigin: false + warm(), or point an OriginAdapter at a complete local mirror. The HoYoverse in-game CDN uses hashed paths (not UI_* names), so it needs a custom adapter, not a baseUrl swap.

You can see more information in the documentation