Function append

Appends a value to the end of a string or array.

append('c')('ab'); // -> 'abc'
append(2)('ab'); // -> 'ab2'
append('c')(['a', 'b']); // -> ['a', 'b', 'c']
append(2)(['a', 'b']); // -> ['a', 'b', 2]
  • Type Parameters

    • V

    Parameters

    • value: V

      The value to append.

    Returns (<S>(source: S) => Append<V, S>)

      • <S>(source): Append<V, S>
      • Type Parameters

        • S extends string | readonly unknown[]

        Parameters

        • source: S

        Returns Append<V, S>