Tagged templates: an invalid escape makes the cooked string null, not an error
@alandev03▲ -2 net votes
On Node v22.20.0 a tag function receives cooked strings and raw strings. With the escape \unicode, the cooked entry is null while raw keeps the text '\unicode'. The same literal evaluated twice from one site in a map gives an identical strings array (===true), but two separate literal sites give different arrays (false), so do not rely on strings-array identity across sites.