
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
This module provides a SteamID object which makes SteamID usage and conversion easy.
This module provides a SteamID object which makes SteamID usage and conversion easy.
Install it from npm:
$ npm install steamid
A SteamID is made up of four parts: its universe, its type, its instance, and its account ID.
There are enums for each type available under the root SteamID object.
SteamID.Universe = {
"INVALID": 0,
"PUBLIC": 1,
"BETA": 2,
"INTERNAL": 3,
"DEV": 4
};
SteamID.Type = {
"INVALID": 0,
"INDIVIDUAL": 1,
"MULTISEAT": 2,
"GAMESERVER": 3,
"ANON_GAMESERVER": 4,
"PENDING": 5,
"CONTENT_SERVER": 6,
"CLAN": 7,
"CHAT": 8,
"P2P_SUPER_SEEDER": 9,
"ANON_USER": 10
};
SteamID.Instance = {
"ALL": 0,
"DESKTOP": 1,
"CONSOLE": 2,
"WEB": 4
};
You can create a SteamID object from a Steam2 rendered ID, a Steam3 rendered ID, a SteamID64, or from the four parts that make up a SteamID.
var SteamID = require('steamid');
var sid = new SteamID('STEAM_0:0:23071901');
var SteamID = require('steamid');
var sid = new SteamID('[U:1:46143802]');
var SteamID = require('steamid');
var sid = new SteamID('76561198006409530');
var SteamID = require('steamid');
var sid = new SteamID();
sid.universe = SteamID.Universe.PUBLIC;
sid.type = SteamID.Type.INDIVIDUAL;
sid.instance = SteamID.Instance.DESKTOP;
sid.accountid = 46143802;
There's a shorthand method for creating an individual SteamID with the desktop instance in the public universe given an accountid:
var SteamID = require('steamid');
var sid = SteamID.fromIndividualAccountID(46143802);
Once you have created a SteamID object, you can access its properties (universe, type, instance, and accountid) or you can convert it between rendered types.
Returns true if the object represents a valid SteamID, or false if not.
Returns true if the type of this SteamID is CHAT, and it's associated with a Steam group's chat room.
Returns true if the type of thie SteamID is CHAT, and it's associated with a Steam lobby.
Shorthand: steam2([newerFormat])
Returns the Steam2 rendered ID format for individual accounts. Throws an error if the type isn't individual.
If you pass true for newerFormat, the first digit will be 1 instead of 0 for the public universe.
Example:
var SteamID = require('steamid');
var sid = new SteamID('76561198006409530');
console.log(sid.getSteam2RenderedID()); // STEAM_0:0:23071901
console.log(sid.getSteam2RenderedID(true)); // STEAM_1:0:23071901
Shorthand: steam3()
Returns the Steam3 rendered ID format.
Examples:
var SteamID = require('steamid');
var sid = new SteamID('76561198006409530');
console.log(sid.getSteam3RenderedID()); // [U:1:46143802]
var gid = new SteamID('103582791434202956');
console.log(gid.getSteam3RenderedID()); // [g:1:4681548]
Returns the 64-bit representation of the SteamID.
Examples:
var SteamID = require('steamid');
var sid = new SteamID('[g:1:4681548]');
console.log(sid.getSteamID64()); // 103582791434202956
var sid2 = new SteamID('STEAM_0:0:23071901');
console.log(sid2.getSteamID64()); // 76561198006409530
Use npm test to run the included test suite.
FAQs
This module provides a SteamID object which makes SteamID usage and conversion easy.
We found that steam-sid demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.