@tf2-automatic/tf2-format
TypeScript icon, indicating that this package has built-in type declarations

9.2.0 • Public • Published

tf2-format

This is a standard library for working with different formats in Team Fortress 2. It is designed with speed and interoperability in mind, and it is a many times faster than alternatives.

Why another library?

I created this library because I needed fast, simple, and reliable handling of different formats in Team Fortress 2. Other libraries are slow, complicated, and rely heavily on hard-coded values. This library can parse different formats into a single common format.

Guides

This library is organized into different classes, each made for working with specific formats. By separating functionality this way, you can easily find and work with the format you need without unnecessary complexity.

Item parsing

For parsing items, e.g. econ items from inventories and trades, or TF2 items from the TF2 GC (node-tf2), use one of the implementations of the Parser class. For parsing econ items, use the EconParser class. For parsing tf2 items, use the TF2Parser class. See here for the item parser documentation.

SKU

For working with SKUs, use the SKU class.

Generating names

For generating the name of items, use the NameGenerator class.

/@tf2-automatic/tf2-format/

    Package Sidebar

    Install

    npm i @tf2-automatic/tf2-format

    Weekly Downloads

    20

    Version

    9.2.0

    License

    MIT

    Unpacked Size

    162 kB

    Total Files

    38

    Last publish

    Collaborators

    • nicklason