• Returns the joined string with the given texts and delimiter

    Parameters

    • Optionaltexts: null | string | string[]

      the source string or strings to inspect

    • Optionalseparator: null | string

      the delimiter string to append between each of the given texts

    • Optionalfilter: ((text?: string) => boolean)

      the filter to check each of the given texts should be included

        • (text?): boolean
        • Parameters

          • Optionaltext: string

          Returns boolean

    Returns string | undefined

    the joined string with the given texts and delimiter

    joinWith('foobar');    // 'foobar'
    joinWith(['foo', 'bar'], undefined); // 'foobar'
    joinWith(['foo', 'bar', 'world'], undefined, (text => text !== 'world')); // 'foobar'