How to use the common-tags.commaLists function in common-tags

To help you get started, we’ve selected a few common-tags examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DefinitelyTyped / DefinitelyTyped / common-tags / common-tags-tests.ts View on Github external
import * as commonTags from 'common-tags';

/* Test Built-in Tags */

commonTags.commaLists `
  I like ${['apples', 'bananas', 'watermelons']}
  They're good!
`;

commonTags.commaListsAnd`
  I like ${['apples', 'bananas', 'watermelons']}
  They're good!
`;

commonTags.commaListsOr`
  I like ${['apples', 'bananas', 'watermelons']}
  They're good!
`;

let fruits = ['apple', 'orange', 'watermelon'];