reuse helper

pull/747/head
Rich Harris 8 years ago
parent a524ab273e
commit b99e9207ac

@ -1,5 +1,5 @@
export function stringify(data: string) {
return JSON.stringify(data.replace(/([^\\@#])?([@#])/g, '$1\\$2'));
return JSON.stringify(escape(data));
}
export function escape(data: string) {

Loading…
Cancel
Save