{"id":18302029,"url":"https://github.com/switchbladebot/runeterra","last_synced_at":"2025-04-05T14:31:18.907Z","repository":{"id":35206764,"uuid":"215892482","full_name":"SwitchbladeBot/runeterra","owner":"SwitchbladeBot","description":"Legends of Runeterra deck code encoder/decoder in JavaScript","archived":false,"fork":false,"pushed_at":"2022-05-22T21:03:37.000Z","size":71,"stargazers_count":49,"open_issues_count":4,"forks_count":10,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-29T22:37:30.866Z","etag":null,"topics":["hacktoberfest","league-api","league-of-legends","leagueoflegends","legends-of-runeterra","legendsofruneterra","riot-games","riot-games-api","riotgames"],"latest_commit_sha":null,"homepage":"","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/SwitchbladeBot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-17T21:57:31.000Z","updated_at":"2024-04-29T17:01:05.000Z","dependencies_parsed_at":"2022-08-09T09:40:53.235Z","dependency_job_id":null,"html_url":"https://github.com/SwitchbladeBot/runeterra","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwitchbladeBot%2Fruneterra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwitchbladeBot%2Fruneterra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwitchbladeBot%2Fruneterra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwitchbladeBot%2Fruneterra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SwitchbladeBot","download_url":"https://codeload.github.com/SwitchbladeBot/runeterra/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247352592,"owners_count":20925297,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["hacktoberfest","league-api","league-of-legends","leagueoflegends","legends-of-runeterra","legendsofruneterra","riot-games","riot-games-api","riotgames"],"created_at":"2024-11-05T15:17:51.203Z","updated_at":"2025-04-05T14:31:18.866Z","avatar_url":"https://github.com/SwitchbladeBot.png","language":"JavaScript","readme":"\u003ch1 align=\"center\"\u003eruneterra\u003c/h1\u003e\n\nJavaScript port of the [**RiotGames/LoRDeckCodes**](https://github.com/RiotGames/LoRDeckCodes/) library, made for encoding and decoding [**Legends of Runeterra**](http://playruneterra.com) card decks. Below is an example code for the [Warmother Control](https://lor.mobalytics.gg/decks/bmibq02t9lr96dua7ta0) deck by **prohibit_hb** on Mobalytics.\n\n```\nCEBAIAIFAEHSQNQIAEAQGDAUDAQSOKJUAIAQCBI5AEAQCFYA\n```\n\n## Install\n```\nnpm install runeterra\n```\n\n## Cards, decks and how to encode them\nIf you want to understand the process of the encoding and decoding decks, please refer to the [original library](https://github.com/RiotGames/LoRDeckCodes/#cards--decks), as Riot has done a great job explaining it there.\n\n## Usage\n```js\nconst { DeckEncoder } = require('runeterra')\n\nconst deck = DeckEncoder.decode('CEAAECABAQJRWHBIFU2DOOYIAEBAMCIMCINCILJZAICACBANE4VCYBABAILR2HRL')\n/*\n[ Card { code: '01PZ019', count: 2 },\n  Card { code: '01PZ027', count: 2 },\n  Card { code: '01PZ028', count: 2 },\n  Card { code: '01PZ040', count: 2 },\n  Card { code: '01PZ045', count: 2 },\n  Card { code: '01PZ052', count: 2 },\n  Card { code: '01PZ055', count: 2 },\n  Card { code: '01PZ059', count: 2 },\n  Card { code: '01IO006', count: 2 },\n  Card { code: '01IO009', count: 2 },\n  Card { code: '01IO012', count: 2 },\n  Card { code: '01IO018', count: 2 },\n  Card { code: '01IO026', count: 2 },\n  Card { code: '01IO036', count: 2 },\n  Card { code: '01IO045', count: 2 },\n  Card { code: '01IO057', count: 2 },\n  Card { code: '01PZ013', count: 1 },\n  Card { code: '01PZ039', count: 1 },\n  Card { code: '01PZ042', count: 1 },\n  Card { code: '01PZ044', count: 1 },\n  Card { code: '01IO023', count: 1 },\n  Card { code: '01IO029', count: 1 },\n  Card { code: '01IO030', count: 1 },\n  Card { code: '01IO043', count: 1 } ]\n*/\n\n// Card\ndeck[0].code    // \"01PZ019\"\ndeck[0].count   // 2\ndeck[0].set     // 1\ndeck[0].id      // 19\ndeck[0].faction // Faction { id: 4, shortCode: \"PZ\" }\n\nconst code = DeckEncoder.encode(deck)\n// CEAAECABAQJRWHBIFU2DOOYIAEBAMCIMCINCILJZAICACBANE4VCYBABAILR2HRL\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswitchbladebot%2Fruneterra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswitchbladebot%2Fruneterra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswitchbladebot%2Fruneterra/lists"}