This file contains hidden or 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
function compact(f) { | |
return unescape( | |
f | |
.toString() // garanto que é uma string | |
.split('') // transformo em array de caracteres | |
.map( // vou iterar e transformar esses caracteres | |
(d,n) => `%uD${n%2?'C':'8'}${d.charCodeAt(0).toString(16)}`) | |
/* | |
aqui acontece a magia | |
D é o caracter |
OlderNewer