ixfx
    Preparing search index...

    Function applyToValues

    • Apples fn to every key of obj which is numeric.

      const o = {
      name: 'john',
      x: 10,
      y: 20
      };
      const o2 = applyToValues(o, (v) => v * 2);

      // Yields: { name: 'john', x: 20, y: 40 }

      Type Parameters

      • TextendsRecord<string, any>

      Parameters

      • object: T
      • apply: (v: number) => number

      Returns T