vlocode-project - v1.40.0-beta-4
    Preparing search index...

    Function setObjectProperty

    • Set a property on the specified object at the specified path. Modifies the original object, when a part of the specified path is not set an empty object is created

      Type Parameters

      • T extends object

      Parameters

      • obj: T

        Object to set the property on

      • prop: string

        Property path to set

      • value: any

        Value to set at the specified path

      • Optionaloptions: { create?: boolean }
        • Optionalcreate?: boolean

          Create an object to be able to set the specified property, otherwise does not set the property specified

      Returns T

      The original obj with the property path set to the specified value;