@goodgamestudios/game-alias
TypeScript icon, indicating that this package has built-in type declarations

0.2.11 • Public • Published

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'

Dependencies (0)

    Dev Dependencies (14)

    Package Sidebar

    Install

    npm i @goodgamestudios/game-alias

    Weekly Downloads

    18

    Version

    0.2.11

    License

    MIT

    Unpacked Size

    7.69 kB

    Total Files

    6

    Last publish

    Collaborators

    • ntggs
    • pverza-ggs
    • prosenboom
    • sashamat
    • mbahri
    • rtryputsko-ext-ggs
    • abuhler_ggs
    • jonasbraga-ggs
    • rschmidt-ggs
    • ssydorenko-ggs
    • vtenekedzhiev-ggs
    • tschrader-ggs
    • goodgame
    • jenkinshtml5migra
    • ddepaolis-ggs
    • boczujda_ggs
    • guest-ggs
    • andreaspizsa
    • cgeisler-ggs
    • amartin-ggs
    • mabdallah-ggs
    • jenkinsempire-ggs
    • chadestioco
    • evmoroz
    • ggs-skunkbot
    • stp_ci_ggs
    • it_office
    • iskliarenko