CmpStr - v3.2.1
    Preparing search index...

    Function set

    • Deeply set a value in an object by a path string.

      Type Parameters

      • T extends Record<string, any>

        The type of the object to get the value from

      Parameters

      • t: T

        The object to set the value in

      • path: string

        The path string, e.g. a.b.c

      • value: any

        The value to set at the specified path

      Returns T

      • The modified object with the value set at the specified path
      • Throws an error if the key is not a valid identifier