I try to render a ES6 template literal variable :
function render(template, data){
...
}
const template = 'resources/${id}/';
console.log(render(template, {id: 1})); // -> resources/1/
Does exist a way to transform a string template with context into a formated string with ES6 template literals feature ?