how to convert this
This is what I use:
const toUni = function (str) { if (str.length < 4) return str.codePointAt(0).toString(16); return str.codePointAt(0).toString(16) + '-' + str.codePointAt(2).toString(16); };