UNPKG

steamgames

Version:

A package for fetching game data from Steam APIs

12 lines (11 loc) 517 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getSteamGameNamefromID = getSteamGameNamefromID; const getSteamIDList_1 = require("./getSteamIDList"); async function getSteamGameNamefromID(appid) { const appList = await (0, getSteamIDList_1.getSteamIDList)(); const appMap = appList.applist.apps.app; // Find the first game whose name contains the search string (case-insensitive) const match = appMap.find((app) => app.appid === appid); return match?.name; }