the template text with variables in the form {variableName}
the variables to replace in the text
a new string with the variables replaced by their values
import { interpolate } from "@trashpanda001/helpers/string"
interpolate("Hello, {name}!", { name: "World" })
// "Hello, World!"
interpolate("Hello, {name}!", { name: "World", age: "42" })
// "Hello, World!" -- age is not used
interpolate("Hello, {name}!", {})
// "Hello, {name}!" -- unknown variable is not replaced
Returns the text with variables replaced by their values.