esprima.parse('a = "привет"') clearly preserves unicode strings in the format supplied
{ type: 'Program',
body:
[ { type: 'ExpressionStatement',
expression:
{ type: 'AssignmentExpression',
operator: '=',
left: { type: 'Identifier', name: 'a' },
right: { type: 'Literal', value: 'привет', raw: '"привет"' } } } ] }
esgen(esprima.parse('a = "привет"')) clearly does not
a = '\u043F\u0440\u0438\u0432\u0435\u0442';
Technically these js-strings are equivalent, but why forego readability?
esprima.parse('a = "привет"')clearly preserves unicode strings in the format suppliedesgen(esprima.parse('a = "привет"'))clearly does notTechnically these js-strings are equivalent, but why forego readability?