{"id":13539602,"url":"https://github.com/saul/demofile","last_synced_at":"2026-01-22T07:36:01.123Z","repository":{"id":3180796,"uuid":"48662850","full_name":"saul/demofile","owner":"saul","description":"Node.js library for parsing Counter-Strike: Global Offensive demo files","archived":false,"fork":false,"pushed_at":"2025-08-31T13:43:13.000Z","size":58780,"stargazers_count":494,"open_issues_count":6,"forks_count":55,"subscribers_count":26,"default_branch":"master","last_synced_at":"2025-08-31T15:33:22.990Z","etag":null,"topics":["analysis","counter-strike","csgo","demo","parser"],"latest_commit_sha":null,"homepage":"https://demofile.dev","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/saul.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":"saul"}},"created_at":"2015-12-27T22:29:06.000Z","updated_at":"2025-08-31T13:43:17.000Z","dependencies_parsed_at":"2023-01-11T16:15:01.472Z","dependency_job_id":"f30a44a4-ed28-4fca-9b9c-2d3ac18acbf7","html_url":"https://github.com/saul/demofile","commit_stats":{"total_commits":326,"total_committers":13,"mean_commits":"25.076923076923077","dds":0.4171779141104295,"last_synced_commit":"d815a88e98698a849326b845c959261a5c7d4d2f"},"previous_names":[],"tags_count":46,"template":false,"template_full_name":null,"purl":"pkg:github/saul/demofile","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saul%2Fdemofile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saul%2Fdemofile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saul%2Fdemofile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saul%2Fdemofile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saul","download_url":"https://codeload.github.com/saul/demofile/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saul%2Fdemofile/sbom","scorecard":{"id":801757,"data":{"date":"2025-08-11","repo":{"name":"github.com/saul/demofile","commit":"d815a88e98698a849326b845c959261a5c7d4d2f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Warn: no topLevel permission defined: .github/workflows/generation.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 12 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":3,"reason":"dependency not pinned by hash detected -- score normalized to 3","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:90: update your workflow using https://app.stepsecurity.io/secureworkflow/saul/demofile/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:92: update your workflow using https://app.stepsecurity.io/secureworkflow/saul/demofile/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:106: update your workflow using https://app.stepsecurity.io/secureworkflow/saul/demofile/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/saul/demofile/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/saul/demofile/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/saul/demofile/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/saul/demofile/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/saul/demofile/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:72: update your workflow using https://app.stepsecurity.io/secureworkflow/saul/demofile/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:73: update your workflow using https://app.stepsecurity.io/secureworkflow/saul/demofile/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/generation.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/saul/demofile/generation.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/generation.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/saul/demofile/generation.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/generation.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/saul/demofile/generation.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:26","Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:56","Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:78","Warn: npmCommand not pinned by hash: .github/workflows/ci.yml:98","Warn: npmCommand not pinned by hash: .github/workflows/generation.yml:27","Info:   0 out of  12 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   4 out of   9 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":0,"reason":"25 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-h755-8qp9-cq85","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-434g-2637-qmqr","Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m","Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw","Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p","Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747","Warn: Project is vulnerable to: GHSA-vjh7-7g9h-fjfh","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-36fh-84j7-cv5h","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-h7cp-r72f-jxh6","Warn: Project is vulnerable to: GHSA-v62p-rq8g-8h59","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T10:40:57.319Z","repository_id":3180796,"created_at":"2025-08-23T10:40:57.319Z","updated_at":"2025-08-23T10:40:57.319Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28658107,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analysis","counter-strike","csgo","demo","parser"],"created_at":"2024-08-01T09:01:28.888Z","updated_at":"2026-01-22T07:36:01.079Z","avatar_url":"https://github.com/saul.png","language":"JavaScript","funding_links":["https://github.com/sponsors/saul"],"categories":["JavaScript","\u003ca id=\"5dd93fbc2f2ebc8d98672b2d95782af3\"\u003e\u003c/a\u003e工具"],"sub_categories":["\u003ca id=\"0b8e79b79094082d0906153445d6ef9a\"\u003e\u003c/a\u003eCobaltStrike"],"readme":"# demofile ![npm](https://img.shields.io/npm/v/demofile) ![CI](https://github.com/saul/demofile/workflows/CI/badge.svg)\n\nA node.js library for parsing Counter-Strike Global Offensive (CSGO) demo files.\nThe library is also Browserify-able, and a standalone bundle that you can `\u003cscript src=\"...\"\u003e` is available in [browser/bundle.js](browser/bundle.js).\n\nThis library also supports streaming from [GOTV broadcasts](https://developer.valvesoftware.com/wiki/Counter-Strike:_Global_Offensive_Broadcast) over HTTP, with `DemoFile#parseBroadcast`.\n\n\u003e ⚠️ This library requires Node v14 or later.\n\n### ❓ Need help\n\n- First, search the ['Questions' discussion board](https://github.com/saul/demofile/discussions/categories/questions) - your question has probably already been asked.\n- If not, [start a new 'Questions' discussion](https://github.com/saul/demofile/discussions/new?category=questions).\n- If you think you've found a bug, [raise an issue](https://github.com/saul/demofile/issues/new/choose).\n\n## Supported demo features\n\n- GOTV and POV perspective fully supported\n- Game events (e.g. `player_death`)\n- User messages (e.g. chat messages, HUD text)\n- Console variables (cvar/convars)\n- Entity updates, server classes, data tables\n- String tables\n- Reading encrypted messages (e.g. chat in public matchmaking demos)\n- Streaming from [GOTV broadcasts over HTTP](https://developer.valvesoftware.com/wiki/Counter-Strike:_Global_Offensive_Broadcast)\n\n## Running the examples\n\nGetting started is simple:\n\n```bash\n.../demofile$ npm ci\n.../demofile$ cd examples\n.../demofile/examples$ npm ci\n```\n\nYou can now run the example scripts. Take a look in the [`examples`](https://github.com/saul/demofile/tree/master/examples) folder for some scripts to try out. Detailed descriptions of these scripts can be found below in the [Examples](#examples) section below.\n\nIf you don't have any demo files to hand, use the `demos/download.sh` Bash script to download the ones used for testing.\n\n```bash\n.../demofile/examples$ npx ts-node dumpfile.ts ../demos/pc419-vs-chiefs-mirage.dem\nnpx: installed 14 in 1.883s\nDemo header: {\n  magic: 'HL2DEMO',\n  protocol: 4,\n  networkProtocol: 13753,\n  serverName: 'Counter-Strike: Global Offensive',\n  clientName: 'GOTV Demo',\n  mapName: 'de_mirage',\n  gameDirectory: 'csgo',\n  playbackTime: 2569.375,\n  playbackTicks: 328880,\n  playbackFrames: 164271,\n  signonLength: 433479\n}\n...\n```\n\n## Installation\n\n### Node\n\n```bash\nnpm install --save demofile\n```\n\n### Browser\n\n```html\n\u003cscript src=\"browser/bundle.js\"\u003e\u003c/script\u003e\n```\n\nThe `DemoFile` module will be available as `window.demofile`.\n\n## Screenshot\n\nUsing the [dumpfile example](https://github.com/saul/demofile/blob/master/examples/dumpfile.ts):\n\n![Example output](./example.png)\n\n## Documentation\n\nAuto-generated API documentation is available at [saul.github.io/demofile](https://saul.github.io/demofile).\n\n| Class                                                             | Description                         |\n| ----------------------------------------------------------------- | ----------------------------------- |\n| [DemoFile](https://saul.github.io/demofile/classes/DemoFile.html) | Represents a demo file for parsing. |\n\nThe _DemoFile_ object has properties which point to instances of several other classes that can be used to inspect and listen to changes in the game world:\n\n| Class                                                                     | Property                | Description                                                                            |\n| ------------------------------------------------------------------------- | ----------------------- | -------------------------------------------------------------------------------------- |\n| [ConVars](https://saul.github.io/demofile/classes/ConVars.html)           | `demoFile.conVars`      | Manages console variables. (Only `FCVAR_NOTIFY` and `FCVAR_REPLICATED` are available.) |\n| [Entities](https://saul.github.io/demofile/classes/Entities.html)         | `demoFile.entities`     | Represents entities and networked properties within a demo.                            |\n| [GameEvents](https://saul.github.io/demofile/classes/GameEvents.html)     | `demoFile.gameEvents`   | Manages game events for a demo file. (e.g. `player_death`, `bomb_defused`)             |\n| [StringTables](https://saul.github.io/demofile/classes/StringTables.html) | `demoFile.stringTables` | Handles string tables for a demo file. (e.g. `userinfo`)                               |\n| [UserMessages](https://saul.github.io/demofile/classes/UserMessages.html) | `demoFile.userMessages` | Handles user messages for a demo file. (e.g. `SayText` for in-game chat messages)      |\n\nThere are several classes which allow access to different types of entities (e.g. players, items, props). These are summarised below:\n\n| Entity                                                                  | Usage                                                                         | Description                                                                                                 |\n| ----------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |\n| [Networkable](https://saul.github.io/demofile/classes/Networkable.html) | `demoFile.entities.getByHandle`\u003cbr\u003e`demoFile.entities.entities.get(entIndex)` | Base class of all in-game entities, even non-renderable entities (e.g. `CCSTeam`).                          |\n| [BaseEntity](https://saul.github.io/demofile/classes/BaseEntity.html)   |                                                                               | Base class of the vast majority of in-game entities (e.g. players, weapons, all other renderable entities). |\n| [Player](https://saul.github.io/demofile/classes/Player.html)           | `demoFile.entities.players`\u003cbr\u003e`demoFile.entities.getByUserId`                | Represents an in-game player.                                                                               |\n| [Team](https://saul.github.io/demofile/classes/Team.html)               | `demoFile.entities.teams`\u003cbr\u003e`player.team`                                    | Represents a team (terrorists, counter-terrorists, spectators).                                             |\n| [Weapon](https://saul.github.io/demofile/classes/Weapon.html)           | `demoFile.entities.weapons`\u003cbr\u003e`player.weapon`\u003cbr\u003e`player.weapons`            | Represents an in-game weapon (guns, grenades, knifes).                                                      |\n| [Projectile](https://saul.github.io/demofile/classes/Projectile.html)   |                                                                               | Represents a thrown grenade projectile (e.g. a flying smoke grenade).                                       |\n| [GameRules](https://saul.github.io/demofile/classes/GameRules.html)     | `demoFile.gameRules`                                                          | Represents the game rules and parts of the match state (e.g. round number, is warmup)                       |\n\n## API\n\nThis library provides full access to all data available in CSGO demo files. Unlike some other libraries, `demofile` is feature complete and supports the latest demos. As well as providing high-level APIs to access the state of the game, low-level access is available and is not discouraged.\n\nNote that events are fired at the end of a tick, after all entity props and string tables have been updated.\n\n### Examples\n\nVarious examples are available in the `examples` folder:\n\n| Example                                                                                        | Description                                                                            |\n| ---------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |\n| [`join-leave.ts`](https://github.com/saul/demofile/blob/master/examples/join-leave.ts)         | Print all players that join and leave the game during the course of the demo.          |\n| [`molotov.ts`](https://github.com/saul/demofile/blob/master/examples/molotov.ts)               | Prints the location of molotov/incendiary grenade explosions.                          |\n| [`paintkits.ts`](https://github.com/saul/demofile/blob/master/examples/paintkits.ts)           | Collects paint kits of each weapon that is used in a kill.                             |\n| [`plant-site.ts`](https://github.com/saul/demofile/blob/master/examples/plant-site.ts)         | Prints which player planted the bomb and at which site.                                |\n| [`purchases.ts`](https://github.com/saul/demofile/blob/master/examples/purchases.ts)           | Prints which items are purchased by each player.                                       |\n| [`rank.ts`](https://github.com/saul/demofile/blob/master/examples/rank.ts)                     | At the end of the game, prints all player ranks.                                       |\n| [`scores.ts`](https://github.com/saul/demofile/blob/master/examples/scores.ts)                 | Prints team scores after each round.                                                   |\n| [`tickrate.ts`](https://github.com/saul/demofile/blob/master/examples/tickrate.ts)             | Prints demo tick rate and duration in seconds.                                         |\n| [`trajectory.ts`](https://github.com/saul/demofile/blob/master/examples/trajectory.ts)         | Prints grenade trajectories and who threw them.                                        |\n| ⚠ Advanced: [`dumpfile.ts`](https://github.com/saul/demofile/blob/master/examples/dumpfile.ts) | Advanced example of recreating coloured chat messages, round scores and the kill feed. |\n\n#### Print kills\n\n```js\nconst fs = require(\"fs\");\nconst demofile = require(\"demofile\");\n\nconst demoFile = new demofile.DemoFile();\n\ndemoFile.gameEvents.on(\"player_death\", e =\u003e {\n  const victim = demoFile.entities.getByUserId(e.userid);\n  const victimName = victim ? victim.name : \"unnamed\";\n\n  // Attacker may have disconnected so be aware.\n  // e.g. attacker could have thrown a grenade, disconnected, then that grenade\n  // killed another player.\n  const attacker = demoFile.entities.getByUserId(e.attacker);\n  const attackerName = attacker ? attacker.name : \"unnamed\";\n\n  const headshotText = e.headshot ? \" HS\" : \"\";\n\n  console.log(`${attackerName} [${e.weapon}${headshotText}] ${victimName}`);\n});\n\ndemoFile.parseStream(fs.createReadStream(\"test.dem\"));\n\n/* Outputs:\n\nHS [cz75a HS] flusha\nLekr0 [ak47 HS] friberg\nKRIMZ [ak47] HS\nJW [mac10 HS] Mixwell\nJW [hegrenade] HS\nJW [mac10 HS] Magisk\n\n*/\n```\n\n#### Print player information when it changes\n\n```js\nconst fs = require(\"fs\");\nconst demofile = require(\"demofile\");\n\nconst demoFile = new demofile.DemoFile();\n\ndemoFile.stringTables.on(\"update\", e =\u003e {\n  if (e.table.name === \"userinfo\" \u0026\u0026 e.userData != null) {\n    console.log(\"\\nPlayer info updated:\");\n    console.log(e.entryIndex, e.userData);\n  }\n});\n\ndemoFile.parseStream(fs.createReadStream(\"test.dem\"));\n\n/* Outputs:\n\nPlayer info updated:\n0 {\n  xuid: Long { low: 0, high: 0, unsigned: false },\n  name: 'ESEA SourceTV',\n  userId: 2,\n  guid: 'BOT',\n  friendsId: 0,\n  friendsName: '',\n  fakePlayer: true,\n  isHltv: false\n}\n\nPlayer info updated:\n1 {\n  xuid: Long { low: 32578248, high: 17825793, unsigned: false },\n  name: 'PC419 m0nt-S-',\n  userId: 3,\n  guid: 'STEAM_1:0:16289124',\n  friendsId: 32578248,\n  friendsName: '',\n  fakePlayer: false,\n  isHltv: false\n}\n\n[repeated for other players]\n*/\n```\n\n### Useful links\n\n- [CS:GO Game Events - AlliedModders Wiki](https://wiki.alliedmods.net/Counter-Strike:_Global_Offensive_Events)\n\n## Contributing\n\nPlease read the [Contributing Guidelines](./CONTRIBUTING.md) to learn how you can help out on the project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaul%2Fdemofile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaul%2Fdemofile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaul%2Fdemofile/lists"}