🏠 Homepage
- Tree-shakable
- Side-effects free
- No dependencies
For frontend applications, it is worth checking out Bundle Phobia and viewing the Export Analysis
to see the GZipped cost of importing parts of the module.
For example, products
makes up the vast majority (~62kB) of the total package size (~72kB). As such, importing all other parts would have a near-negligible effect on build sizes.
Install this package using your package manager of choice.
npm i @rocketleagueapi/items
or
yarn add @rocketleagueapi/items
const { products } = require('@rocketleagueapi/items');
// Where 32 is the product ID
const alphaBoost = products[32];
console.log(alphaBoost.paintable) // false
Using ItsBrank's CodeRed, we can dump the necessary information to update this module. The information in this module is derived from the game and is extacted using CodeRed. The commands needed to dump the src/raw
JSON files can be found in scripts/dump_databases.crsq
.
Run these commands and copy the resultant output from your CodeRed Dump folder to src/raw
.
Note: You will need to convert the ProductDump.json
encoding from ANSI to UTF8 before the next step. I usually to do this using Notepad++.
Afterwards, run the parse script:
npm run parse
Give a ⭐️ if this project helped you!
Copyright © 2021 Rocket League API.
This project is LGPL--3.0--or--later licensed.