Gathering detailed insights and metrics for csgo-sharecode
Gathering detailed insights and metrics for csgo-sharecode
Gathering detailed insights and metrics for csgo-sharecode
Gathering detailed insights and metrics for csgo-sharecode
npm install csgo-sharecode
Typescript
Module System
Min. Node Version
Node Version
NPM Version
73.6
Supply Chain
99.4
Quality
75.7
Maintenance
100
Vulnerability
81.3
License
TypeScript (99.17%)
JavaScript (0.83%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
GPL-2.0 License
45 Stars
69 Commits
3 Forks
3 Watchers
3 Branches
3 Contributors
Updated on Jun 12, 2025
Minified
Minified + Gzipped
Latest Version
3.1.2
Package Id
csgo-sharecode@3.1.2
Unpacked Size
61.26 kB
Size
15.41 kB
File Count
10
NPM Version
9.6.7
Node Version
18.17.1
Published on
Dec 13, 2023
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
4
JS module to decode / encode CS:GO and CS2 share codes used to share game replays/crosshairs between players.
npm install csgo-sharecode
This module relies on BigInt, your target platform must support it!
Decodes a match share code into a MatchInformation
object.
1import { decodeMatchShareCode, MatchInformation } from 'csgo-sharecode'; 2 3const shareCode = 'CSGO-GADqf-jjyJ8-cSP2r-smZRo-TO2xK'; 4const matchInformation: MatchInformation = decodeMatchShareCode(shareCode); 5console.log(matchInformation); 6// output: 7// 8// { 9// matchId: 3230642215713767580n, 10// reservationId: 3230647599455273103n, 11// tvPort: 55788 12// }
Encodes a MatchInformation
object into a match share code.
The example below use values coming from a real CDataGCCStrike15_v2_MatchInfo (lookup for CDataGCCStrike15_v2_MatchInfo
) message.
You should get them from the Steam Game Coordinator or from a .info file.
1import { encodeMatch, MatchInformation } from 'csgo-sharecode'; 2 3const matchInformation: MatchInformation = { 4 matchId: BigInt('3230642215713767580'), 5 reservationId: BigInt('3230647599455273103'), 6 tvPort: 599906796, 7}; 8 9const shareCode = encodeMatch(matchInformation); 10console.log(shareCode); 11// output: 12// 13// "CSGO-GADqf-jjyJ8-cSP2r-smZRo-TO2xK"
Decodes a crosshair share code into a Crosshair
object.
1import { decodeCrosshairShareCode, Crosshair } from 'csgo-sharecode'; 2 3const shareCode = 'CSGO-WsnnD-eHaMw-QNDf9-oxuDh-ydOUD'; 4const crosshair: Crosshair = decodeCrosshairShareCode(shareCode); 5console.log(crosshair); 6// output: 7// 8// { 9// gap: -2.2, 10// outline: 1, 11// red: 50, 12// green: 250, 13// blue: 50, 14// alpha: 200, 15// splitDistance: 3, 16// followRecoil: true, 17// fixedCrosshairGap: 3, 18// color: 1, 19// outlineEnabled: true, 20// innerSplitAlpha: 0, 21// outerSplitAlpha: 1, 22// splitSizeRatio: 1, 23// thickness: 0.6, 24// centerDotEnabled: false, 25// deployedWeaponGapEnabled: true, 26// alphaEnabled: true, 27// tStyleEnabled: false, 28// style: 2, 29// length: 10 30// }
Encodes a Crosshair
object into a crosshair share code.
1import { encodeCrosshair, Crosshair } from 'csgo-sharecode'; 2 3const crosshair: Crosshair = { 4 gap: -2.2, 5 outline: 1, 6 red: 50, 7 green: 250, 8 blue: 50, 9 alpha: 200, 10 splitDistance: 3, 11 fixedCrosshairGap: 3, 12 color: 1, 13 innerSplitAlpha: 0, 14 outlineEnabled: true, 15 outerSplitAlpha: 1, 16 splitSizeRatio: 1, 17 thickness: 0.6, 18 centerDotEnabled: false, 19 alphaEnabled: true, 20 tStyleEnabled: false, 21 style: 2, 22 length: 10, 23 deployedWeaponGapEnabled: true, 24 followRecoil: true, 25}; 26 27const shareCode = encodeCrosshair(crosshair); 28console.log(shareCode); 29// output: 30// 31// "CSGO-WsnnD-eHaMw-QNDf9-oxuDh-ydOUD"
Utility function to generate CSGO ConVars for a given crosshair.
1import { crosshairToConVars, Crosshair } from 'csgo-sharecode'; 2 3const crosshair: Crosshair = { 4 gap: -2.2, 5 outline: 1, 6 red: 50, 7 green: 250, 8 blue: 50, 9 alpha: 200, 10 splitDistance: 3, 11 fixedCrosshairGap: 3, 12 color: 1, 13 innerSplitAlpha: 0, 14 outlineEnabled: true, 15 outerSplitAlpha: 1, 16 splitSizeRatio: 1, 17 thickness: 0.6, 18 centerDotEnabled: false, 19 alphaEnabled: true, 20 tStyleEnabled: false, 21 style: 2, 22 length: 10, 23 deployedWeaponGapEnabled: true, 24 followRecoil: true, 25}; 26 27const conVars = crosshairToConVars(crosshair); 28console.log(conVars); 29// Output: 30// 31// cl_crosshair_drawoutline "1" 32// cl_crosshair_dynamic_maxdist_splitratio "1" 33// cl_crosshair_dynamic_splitalpha_innermod "0" 34// cl_crosshair_dynamic_splitalpha_outermod "1" 35// cl_crosshair_dynamic_splitdist "3" 36// cl_crosshair_outlinethickness "1" 37// cl_crosshair_t "0" 38// cl_crosshairalpha "200" 39// cl_crosshaircolor "1" 40// cl_crosshaircolor_b "50" 41// cl_crosshaircolor_g "250" 42// cl_crosshaircolor_r "50" 43// cl_crosshairdot "0" 44// cl_crosshairgap "-2.2" 45// cl_crosshairgap_useweaponvalue "1" 46// cl_crosshairsize "10" 47// cl_crosshairstyle "2" 48// cl_crosshairthickness "0.6" 49// cl_crosshairusealpha "1" 50// cl_fixedcrosshairgap "3" 51// cl_crosshair_recoil "1"
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
Found 1/21 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
15 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-23
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More