UNPKG

@augment-vir/common

Version:

A collection of augments, helpers types, functions, and classes for any JavaScript environment.

22 lines (21 loc) 712 B
/** * Join elements into a string with commas separating each value. Add a conjunction before the final * item in the list. If the array has a length < 2, the conjunction is not added. If the list is * only of length 2, then no commas are added. * * @category String * @category Package : @augment-vir/common * @package [`@augment-vir/common`](https://www.npmjs.com/package/@augment-vir/common) */ export declare function joinWithFinalConjunction( /** * Array of items to be converted into strings. Works best if these are simply strings to begin * with. */ list: ReadonlyArray<any>, /** * The conjunction to be used before the final element. * * @default 'and' */ conjunction?: string): string;