@ianlucas/cs2-lib
TypeScript icon, indicating that this package has built-in type declarations

4.5.0 • Public • Published

cs2-lib

A TypeScript library for manipulating Counter-Strike 2 data

This library contains items and data from Counter-Strike 2, including utility functions and classes for manipulating them using TypeScript.

Install

npm install @ianlucas/cs2-lib

Usage

For any module that deals with economy items, you need to setup the available items (CS_ITEMS contains all items from the game):

import english from "@ianlucas/cslib/assets/translations/items-english.json";
import { CS_Economy, CS_ITEMS } from "@ianlucas/cs2-lib";

CS_Economy.use({
    items: CS_ITEMS,
    translation: english
});

const item = CS_Economy.getById(307);

item.name;
//=> "AWP | Dragon Lore"

Readme

Keywords

none

Package Sidebar

Install

npm i @ianlucas/cs2-lib

Weekly Downloads

231

Version

4.5.0

License

MIT

Unpacked Size

181 MB

Total Files

51

Last publish

Collaborators

  • ianlucas