chat-codes
Encode and decode Guild Wars2 chat codes
This is part of gw2efficiency. Please report all issues in the central repository.
Install
npm install gw2e-chat-codes
This module can be used for Node.js as well as browsers using Browserify.
Usage
const { encode, decode } = require('gw2e-chat-codes')
let encodedSkill = encode('skill', 5842)
let encodedItem = encode('item', {id: 46762, quantity: 10, skin: 5807, upgrades: [24554, 24615]})
let decodedCode = decode('[&BtIWAAA=]')
Tests
npm test
Licence
MIT
Big thanks to codemasher & poke,
who wrote this algorithm in PHP, and
darthmaim who wrote most of the build template link code.