Assemble a template string with a tagged template literals as normally

68 views Asked by At

I'm looking for a function that takes strings and values and assembles the template string as a normal untagged template literal would. Does this exist? What's the logic? What needs to go inside the tag function to make the test case be complete?

function tag(strings, ...values) {
  return ''
}

let example = soup

let one = tag`string text ${example} 1 string text line 2`
let two = `string text ${example} 1 string text line 2`

assert.equals(one, two)
0

There are 0 answers