| if (!text) | if (!text) | ||||
| return '' | return '' | ||||
| return text.replace(/\\u[0-9a-f]{4}/g, (_match, p1) => { | |||||
| return text.replace(/\\u([0-9a-f]{4})/g, (_match, p1) => { | |||||
| return String.fromCharCode(Number.parseInt(p1, 16)) | return String.fromCharCode(Number.parseInt(p1, 16)) | ||||
| }) | }) | ||||
| } | } |