@kant/node-boxcars
v0.3.1
Published
RL Replay Parser for Node.js using napi-rs and boxcars
Downloads
297
Maintainers
Readme
@kant/node-boxcars
Node.js bindings for the boxcars parser. Read Rocket League .replay files and get back JSON.
Installation
yarn add @kant/node-boxcars
# or
npm install @kant/node-boxcarsUsage
import { readFile, readFileHeader } from "@kant/node-boxcars";
// Parse the full replay (including network frames)
const replay = JSON.parse(readFile("./path/to/match.replay"));
console.log(replay.game_type);
// Parse only the header for quick metadata access
const header = JSON.parse(readFileHeader("./path/to/match.replay"));
console.log(header.properties.TeamSize);Both functions synchronously return a JSON string that matches the boxcars::Replay structure.
Development
- Install the latest Rust toolchain
- Install Node.js 10+ (Node-API) and yarn/corepack
- Build:
yarn build - Test:
yarn test
Release
Set NPM_TOKEN in the repository secrets before tagging a release.
npm version [patch|minor|major]
git pushGitHub Actions will publish the prebuilt binaries for supported platforms.
