https://github.com/emily33901/js-csfriendcode
Generate CSGO friend codes from steamid64s
https://github.com/emily33901/js-csfriendcode
Last synced: about 1 month ago
JSON representation
Generate CSGO friend codes from steamid64s
- Host: GitHub
- URL: https://github.com/emily33901/js-csfriendcode
- Owner: emily33901
- License: bsd-2-clause
- Created: 2020-09-13T13:16:20.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-08-20T18:40:35.000Z (9 months ago)
- Last Synced: 2025-04-09T13:19:12.888Z (about 1 month ago)
- Language: JavaScript
- Size: 11.7 KB
- Stars: 7
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# csgo-friendcode
Based on the [go version](https://github.com/emily33901/go-csfriendcode) that I wrote initially. This takes a steamid64 and turns it into a CSGO friend code or takes a friend code and turns it into a steamid64.
```js
const FriendCode = require("csgo-friendcode");// Should be SUCVS-FADA
console.log(FriendCode.encode(76561197960287930n));
console.log(FriendCode.encode("76561197960287930"));// should be 76561197960287930
console.log(FriendCode.decode("SUCVS-FADA"));// Generate a drirect challenge
console.log(FriendCode.encode_direct_challenge(22202n));
console.log(FriendCode.encode_direct_challenge(76561197960287930n));
console.log(FriendCode.encode_direct_challenge("76561197960287930"));// Decode a direct challenge
console.log(
FriendCode.decode_direct_challenge(FriendCode.encode_direct_challenge(22202n))
);// Generate a drirect group challenge
console.log(FriendCode.encode_direct_group_challenge(31642128n));
console.log(FriendCode.encode_direct_group_challenge(103582791461163536n));
console.log(FriendCode.encode_direct_group_challenge("103582791461163536"));console.log(
FriendCode.decode_direct_challenge(
FriendCode.encode_direct_group_challenge(31642128n)
)
);
```