Socket
Book a DemoInstallSign in
Socket

steam-id-convertor

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

steam-id-convertor

Convert SteamIds from 32-bit to 64-bit numbers and vice versa

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

steam-id-convertor

Convert SteamIds from 32-bit to 64-bit numbers and vice versa

Useful when using dota 2 api http://dev.dota2.com/showthread.php?t=58317

The Dota2 API generally gives you people's SteamIDs as 32-bit numbers.

In order to convert from these 32-bit numbers to Steam Names, you must first convert between the 32-bit ID and 64-bit ID: On a system that supports up to 64-bit numbers you can do the following:

  • STEAMID64 - 76561197960265728 = STEAMID32
  • STEAMID32 + 76561197960265728 = STEAMID64
    npm install steam-id-convertor
    var dendi32 = '70388657';
    var dendi64 = '76561198030654385';

    var convertor = require('steam-id-convertor');

    convertor.to64(dendi32) == dendi64;
    convertor.to32(dendi64) == dendi64;

FAQs

Package last updated on 24 May 2015

Did you know?

Socket

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.

Install

Related posts