)
}
}
)
(
}
{
)
)
(
)
(
(
{
}
)
(
)
}
)
)
{
(
(
)
)
}
)
(
}

Mangler

  1. const lookupReplacements = {
  2.   // entities (like ∑ or Θ - are safer
  3.   // than just putting things inline like ∑ or ®
  4.   'a': ['A', 'Ä', '∆', 'á'],
  5.   'e': ['é', '∃'],
  6.   't': ['⊤', 'Τ'] ,
  7.   'b': ['β'],
  8.   'o': ['∅', '_o_']
  9. }
  10.  
  11. function mangle(s) {
  12.   return s.split``.map(letter => {
  13.     const chars = lookupReplacements[letter]
  14.     return chars ? chars[
  15.       Math.floor(
  16.         chars.length * Math.random()
  17.       )
  18.     ] : letter
  19.   }).join``
  20. }
  21.  
  22. document.body.innerHTML = mangle('Been taking a break from making snippets... might start up again...<hr>')
  23.  
  24. document.body.innerHTML += mangle('Been taking a break from making snippets... might start up again...<hr>')
  25.  
  26. document.body.innerHTML += mangle('Been taking a break from making snippets... might start up again...<hr>')

Substitute some characters in a string with some random choices…

snippet.zone ~ 2021-24 /// {s/z}