Last active
June 19, 2018 06:24
-
-
Save rsxdalv/bc6d82246b7c13bec7f1b88ea155c39f to your computer and use it in GitHub Desktop.
JS-string-to-css-charcodes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const x = 'ievelc šeit' | |
console.log( | |
Array(x.length).fill(0).map((_, i) => | |
`\${Number( | |
x.charCodeAt(i) | |
).toString(16).padStart(4, 0)}` | |
).join("") | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment