libram
    Preparing search index...

    Function makeByXFunction

    • Makes a byX function, like byStat or byClass

      Type Parameters

      • T extends string

      Parameters

      • source: Delayed<T>

        A method for finding your stat, or class, or whatever X is in this context

      Returns <S>(options: Switch<T, S>, alternateSource?: Delayed<T, never[]>) => S

      A function akin to byStat or byClass; it accepts an object that either is "complete" in the sense that it has a key for every conceivable value, or contains a default parameter. If an inappropriate input is provided, returns undefined.