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

tf2inv

v0.0.12

Published

> quoting some other text

Readme

h1

h2

h3

h4

h5
h6

quoting some other text

  • italics * ** bold **
  • list 1
  • list 2
  • list 3
function test() {
  console.log("notice the blank line before this function?");
}

npm-tf2inv

###Introduction

tf2inv is a module used purposefully for the handling of the valve webAPI methods with relation to Team Fortress 2. Information regarding items and prices are available through the use of specific functions in this module.

This module is not intended to be generic in such a way that other games can be used, but that is a consideration for a future project

###Usage advice

When using this module, a few pre-requisities are to be employed:

  • The start function must be called (and provide relevant API keys) prior to any other function within this module
  • The loadSchema, or loadPrices functions must be called prior to utilising any other function that directly consults these objects. The callbacks for loadSchema and loadPrices indicate when these operations have been completed.

###Available functions

####Set-up

#####Start

start(inputSteam, inputBPTF, prefix, inv, friend, summ, play) {

Arguments

  • 'inputSteam' - Your steam API key in string formet
  • 'inputBPTF' - Your backpack.tf API key in string format
  • 'prefix' - A console log message prefix for categorising [OPTIONAL]
  • 'inv' - the folder name where cached inventories are stored [OPTIONAL]
  • 'friend' - the folder name where cached friendslists are stored [OPTIONAL]
  • 'summ' - the folder name where cached player summaries are stored [OPTIONAL]
  • 'play' - the folder name where cached playtimes are stored

This function configures and sets up the


#####loadSchema

loadSchema(force, cache, callback) {

Arguments

  • example
  • example
  • example

#####loadPrices

loadPrices(force, cache, callback) {

Arguments

  • example
  • example
  • example

#####loadFriends

loadFriends(force, sid, callback) {

Arguments

  • example
  • example
  • example

#####loadPlayerSummary

loadPlayerSummary(force, sid, callback) {

Arguments

  • example
  • example
  • example

#####loadGamePlaytime

loadGamePlaytime(force, sid, callback) {

Arguments

  • example
  • example
  • example

#####loadInventory

loadInventory(force, sid, callback) {

Arguments

  • example
  • example
  • example

#####getSchemaItem

getSchemaItem(invItem) {

Arguments

  • example
  • example
  • example

#####getSchemaItemDefindex

getSchemaItemDefindex(defindex) {

Arguments

  • example
  • example
  • example

#####getAllDefs

getAllDefs() {

Arguments

  • example
  • example
  • example

#####findItem

findItem(text) {

Arguments

  • example
  • example
  • example

#####getQuality

getQuality(invItem) {

Arguments

  • example
  • example
  • example

#####qualityName

qualityName(quality) {

Arguments

  • example
  • example
  • example

#####originName

originName(origin) {

Arguments

  • example
  • example
  • example

#####isP2P

isP2P(inventory, callback) {

Arguments

  • example
  • example
  • example

#####getItemLocation

getItemLocation(item) {

Arguments

  • example
  • example
  • example

#####getItemLocationLong

getItemLocationLong(item) {

Arguments

  • example
  • example
  • example

#####getEquippedClasses

getEquippedClasses(item) {

Arguments

  • example
  • example
  • example

#####attributeName

attributeName(attribute) {

Arguments

  • example
  • example
  • example

#####getUnusualEffectItem

getUnusualEffectItem(invItem) {

Arguments

  • example
  • example
  • example

#####getUnusualEffectIndex

getUnusualEffectIndex(id) {

Arguments

  • example
  • example
  • example

#####findUnusualEffect

findUnusualEffect(text) {

Arguments

  • example
  • example
  • example

#####getItemPrice

getItemPrice(invItem) {

Arguments

  • example
  • example
  • example

#####getSpecificPrice

getSpecificPrice (defindex, quality, priceindex) {

Arguments

  • example
  • example
  • example

#####convertCurrency

convertCurrency(price, newCurr) {

Arguments

  • example
  • example
  • example

#####craftWeps

craftWeps (inv, tf2Bot, itemIWant, callback) {

Arguments

  • example
  • example
  • example

#####craftScrap

craftScrap (inv, tf2Bot, callback) {

Arguments

  • example
  • example
  • example

#####craftRec

craftRec (inv, tf2Bot, callback) {

Arguments

  • example
  • example
  • example

#####deleteShit

deleteShit = function (inv, tf2Bot, itemDelete, callback) {

Arguments

  • example
  • example
  • example