Vinyl
    Preparing search index...

    Function getOrSetProp

    • Gets the object's value for the given key if it exists, otherwise sets [key] to defaultValue, returning the newly set value.

      Type Parameters

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

      Parameters

      • object: T
      • key: K
      • defaultValue: () => T[K]

      Returns T[K]