Skip to content

Instantly share code, notes, and snippets.

@Costas-Zeimpekis
Last active February 15, 2022 10:37
Show Gist options
  • Save Costas-Zeimpekis/c82e668ee72545ceff1836b6fe33550b to your computer and use it in GitHub Desktop.
Save Costas-Zeimpekis/c82e668ee72545ceff1836b6fe33550b to your computer and use it in GitHub Desktop.
Proposal for sending customer data to softone
//Vamp backend service
const encodeToUTF16 = (string) =>
Array.from(string, (char) => char.codePointAt());
const codePoints = encodeToUTF16('Agáta')
//Softone
if (Array.isArray(codePoints) {
return String.fromCodePoint(...codePoints)
}
return codePoints;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment