All Projects → gw2efficiency → Chat Codes

gw2efficiency / Chat Codes

Licence: mit
Encode and decode guildwars2 chat codes

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Chat Codes

Normalize Url
Normalize a URL
Stars: ✭ 512 (+10140%)
Mutual labels:  npm-package
Tablesaw
A group of plugins for responsive tables.
Stars: ✭ 5,497 (+109840%)
Mutual labels:  npm-package
Bundlephobia
🏋️ Find out the cost of adding a new frontend dependency to your project
Stars: ✭ 6,640 (+132700%)
Mutual labels:  npm-package
Capture Website Cli
Capture screenshots of websites from the command-line
Stars: ✭ 545 (+10800%)
Mutual labels:  npm-package
Query String
Parse and stringify URL query strings
Stars: ✭ 5,781 (+115520%)
Mutual labels:  npm-package
Rando.js
The world's easiest, most powerful random function.
Stars: ✭ 659 (+13080%)
Mutual labels:  npm-package
Crypto Hash
Tiny hashing module that uses the native crypto API in Node.js and the browser
Stars: ✭ 501 (+9920%)
Mutual labels:  npm-package
Ky
🌳 Tiny & elegant JavaScript HTTP client based on the browser Fetch API
Stars: ✭ 7,047 (+140840%)
Mutual labels:  npm-package
Waud
Web Audio Library
Stars: ✭ 637 (+12640%)
Mutual labels:  npm-package
Conf
Simple config handling for your app or module
Stars: ✭ 707 (+14040%)
Mutual labels:  npm-package
Node Tensorflow
Node.js + TensorFlow
Stars: ✭ 581 (+11520%)
Mutual labels:  npm-package
Scientist.js
🔬 A JavaScript interpretation of the Ruby library Scientist, a library for carefully refactoring critical paths.
Stars: ✭ 600 (+11900%)
Mutual labels:  npm-package
Node Module Boilerplate
Boilerplate to kickstart creating a Node.js module
Stars: ✭ 668 (+13260%)
Mutual labels:  npm-package
Command Line Args
A mature, feature-complete library to parse command-line options.
Stars: ✭ 525 (+10400%)
Mutual labels:  npm-package
Np
A better `npm publish`
Stars: ✭ 6,401 (+127920%)
Mutual labels:  npm-package
Synp
Convert yarn.lock to package-lock.json and vice versa
Stars: ✭ 510 (+10100%)
Mutual labels:  npm-package
React Extras
Useful components and utilities for working with React
Stars: ✭ 651 (+12920%)
Mutual labels:  npm-package
Terminal Image
Display images in the terminal
Stars: ✭ 778 (+15460%)
Mutual labels:  npm-package
Eslint Plugin Node
Additional ESLint's rules for Node.js
Stars: ✭ 740 (+14700%)
Mutual labels:  npm-package
Mevn Cli
Light speed setup for MEVN(Mongo Express Vue Node) Apps
Stars: ✭ 696 (+13820%)
Mutual labels:  npm-package

chat-codes

Build Status Coverage Status

Encode and decode guildwars2 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

import {encode, decode} from 'gw2e-chat-codes'

// Encode a type and id as a chat code
// Valid types are item, map, skill, trait, recipe, skin, outfit & objective
let encodedSkill = encode('skill', 5842)
// -> '[&BtIWAAA=]'

// You can pass an object as second parameter to also encode quantity, skin or upgrades
let encodedItem = encode('item', {id: 46762, quantity: 10, skin: 5807, upgrades: [24554, 24615]})
// -> '[&AgGqtgDgrxYAAOpfAAAnYAAA]'

// Decode a chat code into type and id
let decodedCode = decode('[&BtIWAAA=]')
// -> {type: 'skin', id: 5842}

Tests

npm test

Licence

MIT

Big thanks to codemasher & poke, who wrote this algorithm in PHP.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].