src/codegeneration/TemplateLiteralTransformer.js
/**
 * Adds an empty string at the end if needed. This is needed in case the
 * template literal does not end with a literal portion.
 * @param {Array.<ParseTree>} elements
 * @param {Array.<ParseTree>} items This is the array that gets mutated.
 */
Adds an empty string at the end if needed. This is needed in case the
template literal does not end with a literal portion.
@param {Array.} elements
@param {Array.} items This is the array that gets mutated.
Adds an empty string at the end if needed . This is needed in case the template literal does not end with a literal portion . @param { Array . } elements @param { Array . } items This is the array that gets mutated .
function maybeAddEmptyStringAtEnd(elements, items) {
  var length = elements.length;
  if (!length || elements[length - 1].type !== TEMPLATE_LITERAL_PORTION)
    items.push(createStringLiteral(''));
}
function maybeAddEmptyStringAtEnd ( elements , items ) { var length = elements . length ; if ( ! length || elements [ length - 1 ] . type !== TEMPLATE_LITERAL_PORTION ) items . push ( createStringLiteral ( '' ) ) ; }
Adds an empty string at the end if needed.
Adds an empty string at the end if needed .