Skip to content

gorangajic/steam-id-convertor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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;

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published