@resee-movies/utilities - v0.8.0
    Preparing search index...

    Function toFormattedListString

    • An extra-fancy version of Array.join() that provides a way to wrap array entries in additional content, and differentiate the "last item" separator. The original goal of this method was to simplify taking an array of items and turning them into a plain-language string.

      const shoppingList = ['apples', 'bread', 'sugar', 'tofu'];

      toFormattedListString(shoppingList);
      // => "apples, bread, sugar and tofu"

      Parameters

      Returns string