{"id":21409441,"url":"https://github.com/gw2efficiency/chat-codes","last_synced_at":"2025-07-14T01:31:03.209Z","repository":{"id":57259789,"uuid":"55779770","full_name":"gw2efficiency/chat-codes","owner":"gw2efficiency","description":"Encode and decode guildwars2 chat codes","archived":false,"fork":false,"pushed_at":"2023-09-06T16:01:55.000Z","size":198,"stargazers_count":8,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-25T17:04:28.450Z","etag":null,"topics":["maintained","npm-package"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":false,"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/gw2efficiency.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-04-08T13:08:39.000Z","updated_at":"2024-03-31T20:29:26.000Z","dependencies_parsed_at":"2024-06-19T01:49:00.871Z","dependency_job_id":"d85f1125-51dd-4a0f-82de-73dfb169581f","html_url":"https://github.com/gw2efficiency/chat-codes","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/gw2efficiency/chat-codes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gw2efficiency%2Fchat-codes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gw2efficiency%2Fchat-codes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gw2efficiency%2Fchat-codes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gw2efficiency%2Fchat-codes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gw2efficiency","download_url":"https://codeload.github.com/gw2efficiency/chat-codes/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gw2efficiency%2Fchat-codes/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263603075,"owners_count":23487206,"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":["maintained","npm-package"],"created_at":"2024-11-22T17:26:06.366Z","updated_at":"2025-07-14T01:31:02.916Z","avatar_url":"https://github.com/gw2efficiency.png","language":"TypeScript","readme":"# chat-codes\n\n[![Build Status](https://img.shields.io/travis/com/gw2efficiency/chat-codes?style=flat-square)](https://app.travis-ci.com/github/gw2efficiency/chat-codes)\n[![Coverage Status](https://img.shields.io/codecov/c/github/gw2efficiency/chat-codes/master.svg?style=flat-square)](https://codecov.io/github/gw2efficiency/chat-codes)\n\n\u003e Encode and decode Guild Wars2 chat codes\n\n*This is part of [gw2efficiency](https://gw2efficiency.com). Please report all issues in [the central repository](https://github.com/gw2efficiency/issues/issues).*\n\n## Install\n\n```\nnpm install gw2e-chat-codes\n```\n\nThis module can be used for Node.js as well as browsers using [Browserify](https://github.com/substack/browserify-handbook#how-node_modules-works).\n\n## Usage\n\n```js\nconst { encode, decode } = require('gw2e-chat-codes')\n\n// Encode a type and id as a chat code\n// Valid types are item, map, skill, trait, recipe, skin, outfit \u0026 objective\nlet encodedSkill = encode('skill', 5842)\n// -\u003e '[\u0026BtIWAAA=]'\n\n// You can pass an object as second parameter to also encode quantity, skin or upgrades\nlet encodedItem = encode('item', {id: 46762, quantity: 10, skin: 5807, upgrades: [24554, 24615]})\n// -\u003e '[\u0026AgGqtgDgrxYAAOpfAAAnYAAA]'\n\n// Decode a chat code into type and id\nlet decodedCode = decode('[\u0026BtIWAAA=]')\n// -\u003e {type: 'skin', id: 5842}\n```\n\n## Tests\n\n```\nnpm test\n```\n\n## Licence\n\nMIT\n\nBig thanks to [codemasher](https://github.com/codemasher) \u0026 [poke](https://github.com/poke),\nwho wrote [this algorithm in PHP](https://gist.github.com/codemasher/47dea40f70f990480c5b), and \n[darthmaim](https://github.com/darthmaim) who wrote most of the build template link code.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgw2efficiency%2Fchat-codes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgw2efficiency%2Fchat-codes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgw2efficiency%2Fchat-codes/lists"}