Neighbourhood Party Manager

    @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'

    Keywords

    none

    Install

    npm i @goodgamestudios/game-alias

    DownloadsWeekly Downloads

    20

    Version

    0.2.11

    License

    MIT

    Unpacked Size

    7.69 kB

    Total Files

    6

    Last publish

    Collaborators

    • abuhler_ggs
    • jonasbraga-ggs
    • tduman-ext-gg
    • keep_it_simple
    • lsetton-ext
    • rschmidt-ggs
    • ssydorenko-ggs
    • vtenekedzhiev-ggs
    • tschrader-ggs
    • goodgame
    • jenkinshtml5migra
    • azeino-ggs
    • 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