Package Exports
- cs2inspects
- cs2inspects/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cs2inspects) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
cs2inspects
Simple CS2 item inspect utility for fetching item data from Steam inspect URLs.
Installation
pnpm add cs2inspectsUsage
import { inspect } from "cs2inspects";
const inspectUrl =
"steam://rungame/730/76561202255233023/+csgo_econ_action_preview%20S76561199195821696A43857935637D5226641114339109361";
const result = await inspect(inspectUrl);
if ("iteminfo" in result) {
console.log(result.iteminfo.market_hash_name);
console.log(result.iteminfo.floatvalue);
} else {
console.error("Error:", result.error);
}API
inspect(inspectUrl: string): Promise<InspectResult>
Fetches item data for a given CS2/Steam inspect URL.
Parameters:
inspectUrl- The Steam inspect URL
Returns:
InspectResponse- Success response with item dataInspectError- Error response with error details
Types
The package exports all TypeScript types including InspectResponse, InspectError, ItemInfo, Sticker, and Keychain.
License
MIT