augment-vir - v31.13.0
    Preparing search index...

    Function mapEnumToObject

    Maps all values of an enum as keys in an object where each value is the callback's output for that key.

    import {mapEnumToObject} from '@augment-vir/common';

    enum MyEnum {
    A = 'a',
    B = 'b',
    }

    mapEnumToObject(MyEnum, (enumValue) => {
    return `value-${enumValue}`;
    });
    // output is `{[MyEnum.A]: 'value-a', [MyEnum.B]: 'value-b'}`