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 - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

.eslintignore

8

jest.config.js

@@ -6,2 +6,10 @@ module.exports = {

testPathIgnorePatterns: ['/node_modules/'],
coverageThreshold: {
global: {
branches: 100,
functions: 100,
lines: 100,
statements: 100,
},
},
}

23

package.json
{
"name": "csgo-gamestate-client",
"version": "0.0.1",
"version": "0.0.2",
"description": "",
"main": "build/index.js",
"types": "build/index.d.ts",
"scripts": {
"build": "rimraf ./build && tsc",
"prepublish": "yarn build",
"test": "jest"
"prepare": "yarn build",
"test": "jest --coverage",
"lint": "eslint . --ext .ts",
"prettier-format": "prettier --config .prettierrc 'src/**/*.ts' --write"
},
"homepage": "https://github.com/Zeikko/csgo-gamestate-client",
"bugs": {
"url": "https://github.com/Zeikko/csgo-gamestate-client/issues"
},
"keywords": [],

@@ -15,4 +22,11 @@ "author": "Jaakko Ojalehto",

"devDependencies": {
"@types/jest": "^26.0.20",
"@types/node": "^14.14.25",
"@typescript-eslint/eslint-plugin": "^4.15.0",
"@typescript-eslint/parser": "^4.15.0",
"eslint": "^7.19.0",
"eslint-config-prettier": "^7.2.0",
"eslint-plugin-prettier": "^3.3.1",
"jest": "^26.6.3",
"prettier": "^2.2.1",
"rimraf": "^3.0.2",

@@ -22,6 +36,3 @@ "ts-jest": "^26.5.1",

"typescript": "^4.1.4"
},
"dependencies": {
"@types/jest": "^26.0.20"
}
}

@@ -1,8 +0,8 @@

import { getGamestate, setGamestate } from './index'
import { parseGameState } from './index'
import { playingGameState } from './fixtures/gamestate'
describe('index.ts', () => {
it('sets gamestate and gets gamestate', () => {
setGamestate('test')
expect(getGamestate()).toEqual('test')
describe('parseGameState', () => {
it('parses gamestate and gets gamestate', () => {
expect(parseGameState(playingGameState)).toMatchSnapshot()
})
})
})

@@ -1,16 +0,7 @@

interface Gamestate {
export interface GameState {
round: number
}
let gamestate: Gamestate | null = null
export const setGamestate = (newGamestate: string) => {
gamestate = newGamestate
export const parseGameState = (newGameState: string): GameState => {
return JSON.parse(newGameState) as GameState
}
export const getGamestate = (): Gamestate => {
if (gamestate === null) {
throw new Error('Gamestate has not been set yet. Please call "setGamestate" before "getGamestate"')
}
return gamestate
}

@@ -11,7 +11,10 @@ {

"resolveJsonModule": true,
"rootDir": ".",
"rootDir": "src/",
"strict": true,
"target": "ES2019"
"target": "ES2019",
"declaration": true,
"composite": false,
"declarationMap": true
},
"exclude": ["node_modules", "**/*.test.ts", "build"]
"exclude": ["node_modules", "**/*.test.ts", "build", "*.js", "coverage/**", "src/fixtures/**"]
}

Sorry, the diff of this file is not supported yet

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