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 🙏

© 2024 – Pkg Stats / Ryan Hefner

steamid-resolver

v1.3.5

Published

NPM library to get steamIDs from profile or group links, the other way around and validate sharedfileIDs

Downloads

164

Readme

Features

Convert:

  • ...profile URL or vanity to steamID64
  • ...group URL or Custom URL to groupID64
  • ...steamID64 to profile vanity
  • ...validate sharedfile (screenshots, artworks & guides) IDs

It can also return you all information Steam knows about a profile in a nice object format.

 

Install

Open a terminal in your project folder and run:
> npm install steamid-resolver

Do not use the scoped GitHub Packages command, it will not work.

You can then import the library in your project:

const steamIdResolver = require("steamid-resolver");

 

Functions

All functions support both Promises and callbacks!
This means you can either use await, .then(response => {}) & .catch(err => {}) or pass a callback function (err, response) => {} as parameter.
Note: You cannot use both callbacks and .catch() as a Promise is only rejected when no callback was passed. This prevents any UnhandledPromiseRejection errors crashing your process.

 

steamID64ToCustomUrl(steamID64, callback)

  • steamID64 - steamID64 or full URL of the user you want to get the customURL of. Example: "76561198260031749" or "https://steamcommunity.com/profiles/76561198260031749"
  • callback - Optional: Called on error or success
    • err - A String detailing the reason of the failure or null on success
    • customURL - The customURL of the user or null on failure. Example on success: "3urobeat"

customUrlToSteamID64(customURL, callback)

  • customURL - customURL or full URL of the user you want to get the steamID64 of. Example: "3urobeat" or "https://steamcommunity.com/id/3urobeat"
  • callback - Optional: Called on error or success
    • err - A String detailing the reason of the failure or null on success
    • steamID64 - The steamID64 of the user or null on failure. Example on success: "76561198260031749"

steamID64ToFullInfo(steamID64, callback)

  • steamID64 - steamID64 or full URL of the user you want to get all information of.
  • callback - Optional: Called on error or success
    • err - A String detailing the reason of the failure or null on success
    • info - The full information of the user as object or null on failure. Example: Imagine this but as an object

customUrlToFullInfo(customURL, callback)

  • customURL - customURL or full URL of the user you want to get all information of.
  • callback - Optional: Called on error or success
    • err - A String detailing the reason of the failure or null on success
    • info - The full information of the user as object or null on failure. Example: Imagine this but as an object

groupUrlToGroupID64(groupURL, callback)

  • groupURL - groupURL or full URL of the group you want to get the groupID64 of. Example: "3urobeatGroup" or "https://steamcommunity.com/groups/3urobeatGroup"
  • callback - Optional: Called on error or success
    • err - A String detailing the reason of the failure or null on success
    • groupID64 - The groupID64 of the group or null on failure. Example on success: "103582791464712227"

groupUrlToFullInfo(groupURL, callback)

  • groupURL - groupURL or full URL of the group you want to get all information of.
  • callback - Optional: Called on error or success
    • err - A String detailing the reason of the failure or null on success
    • info - The full information of the group as object or null on failure. Example: Imagine this but as an object

isValidSharedfileID(sharedfileID, callback)

  • sharedfileID - Sharedfile ID or full sharedfile URL. Example: "2966606880" or "https://steamcommunity.com/sharedfiles/filedetails/?id=2966606880"
  • callback - Optional: Called on error or success
    • err - A string detailing the reason of the failure or null on success
    • isValid - true if a sharedfile with that ID exists or false if not