toolish - v0.2.5
    Preparing search index...

    Function getOrAddProperty

    • If the given object contains a property with the given name, returns its value, otherwise adds a new property with the given value and returns that.

      Type Parameters

      • T extends object
      • K extends string | number | symbol

      Parameters

      • object: T
      • name: K
      • value: T[K]

      Returns T[K]