Skip to content

append

Returns a new string with another string appended to the end. It is a small readability helper for cases where chaining string operations reads better than using the + operator inline.

Usage

ts
const path = '/users'.append('/42');

// '/users/42'

Parameters

NameTypeDescription
valuestringString to append.

Returns

The combined string.

Type signature

ts
interface String {
    append(value: string): string;
}

All packages are released under the MIT License.