Vinyl
    Preparing search index...

    Function getOrSet

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

      Type Parameters

      • K
      • V

      Parameters

      • map: Map<K, V>
      • key: K
      • defaultValue: (key: K) => V

      Returns V