@goodgamestudios/game-alias
v0.2.11
Published
Get and convert between game id’s and their various aliases
Downloads
25
Maintainers
Keywords
Readme
Game Aliases
Get and convert between game id’s and their various aliases
Motivation
Different aliases are used for games throughout code and documentation:
- id’s, e.g. 12, 15, etc
- names, e.g. bigfarm, empire, empiremillenniumwars, etc
- codenames, e.g. ranch, castle, etc.
- acronyms, e.g. em, bf, etc
This module provides functions that convert between ids and aliases, and vice versa.
Installation
npm add @goodgamestudios/game-alias
Usage
const {id, name, codename, acronym} = require('@goodgamestudios/game-alias')
id('bigfarm') // ← 15
id('ranch') // ← 15
id(15) // ← 15
name(15) // ← 'bigfarm'
name('bigfarm') // ← 'bigfarm'
name('ranch') // ← 'bigfarm'
codename(15) // ← 'ranch'
codename('ranch') // ← 'ranch'
codename('bigfarm') // ← 'ranch'
acronym(15) // ← 'bf'
acronym('ranch') // ← 'bf'
acronym('bigfarm') // ← 'bf'