Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

csgo-gamestate-client

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

csgo-gamestate-client

A client to parse an interpret the data received from [CS:GO Game State Integration](https://developer.valvesoftware.com/wiki/Counter-Strike:_Global_Offensive_Game_State_Integration)

  • 0.0.2
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

csgo-gamestate-client

A client to parse an interpret the data received from CS:GO Game State Integration

API

function parseGameState(newGameState: string): GameState

Parses the given game state string. Returns the parsed GameState object.

newGameState: string This is the string that the CS:GO client sends as a HTTP POST message.

Example

An example to create an endpoint to receive the CS:GO Game State Integration data and an endpoint the respond with the parsed data.

import express from 'express'
import { parseGameState, GameState } from 'csgo-gamestate-client'

let gameState = null
const app = express()
app.post('/gamestate', (req) => (gameState = parseGameState(req.body)))
app.get('/gamestate', (req, res) => res.json(gameState))
app.listen(3000)

FAQs

Package last updated on 11 Feb 2021

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc