This npm package, currently at version 2.5.1, provides a comprehensive JSON database for the Pokémon Trading Card Game Pocket. It offers various data files including `cards.json` (basic card info), `cards.extra.json` (detailed card info), `sets.json` (grouped by series), `rarities.json`, and `pullRates.json`. The package frequently updates to incorporate new sets, cards, and game data as they are released in Pokémon TCG Pocket. Key differentiators include its specific focus on the TCG Pocket game (distinct from the main Pokémon TCG) and providing multiple data formats like minified (`.min.json`) and image-stripped (`.no-image.min.json`) versions to optimize bandwidth. Additionally, card images are organized into a predictable `cards-by-set` directory structure for easier programmatic access.
npm install pokemon-tcg-pocket-databaseVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to import the various JSON data files and access basic information about sets, cards, and rarities, including generating card image paths.
Refer to the `CHANGELOG.md` file in the repository for the migration guide from v1 to v2, specifically the '2.0.0 - Scizor: Reduce and Split' entry.
For smaller bundles without card images, use `cards.no-image.min.json`. To programmatically access images, construct paths using `cards-by-set/${card.set}/${card.number}.webp`.Update any code relying on the `packs` field on card objects. Review card data structures if migrating from versions prior to 2.2.0.
Ensure you are using an ESM environment with Node.js 16+ or a bundler configured to handle direct JSON imports. For TypeScript, add `"resolveJsonModule": true` and `"esModuleInterop": true` to your `tsconfig.json`.
Update image path generation logic to `cards-by-set/${card.set}/${card.number}.webp`. Verify the base path where the `cards-by-set` directory is located relative to your assets.No dependency data recorded yet.