ezyVet Javascript Helper Library Documentation
    Preparing search index...

    Function mapKeysByFunction

    • mapKeysByFunction this method creates an object with the same values as object and keys generated by running each own enumerable string keyed property of object thru mapper.

      Type Parameters

      • T extends object

      Parameters

      • obj: Record<any, T>
      • mapper: Function

      Returns Record<any, T>

      {Record<any, T>}

      mapKeysByFunction({ 'a': 1, 'b': 2 }, (value, key) => key + value);
      // returns { 'a1': 1, 'b2': 2 }