node.js - how to get the raw version of a template string in iojs -
is possible raw version of template string in iojs ? var s = `foo${1+1}bar` console.log(s); // foo2bar in previous example string: foo${1+1}bar edit1 : need detect whether template string depends on context of if is 'constant' string may contain cr , lf is possible raw version of template string in iojs ? no not. it's not possible raw representation of literal, there no way "raw" literal in these cases: var foo = {[1+1]: 42}; var bar = 1e10; var baz = "\"42\""; note term "template string" misleading (as may indicate somehow raw value of string (which not case shown above)). correct term "template literal ". my need detect whether template string depends on context of if is 'constant' string may contain cr , lf seems job static analysis tool. e.g. can use recast parse source code , traverse template literals. for example, the ast representation of `foo${1+1}bar` is : if suc...