Skip to content

Instantly share code, notes, and snippets.

@dumbmoron
Created August 2, 2023 21:00
Show Gist options
  • Select an option

  • Save dumbmoron/59baad563a18828f8801e06f141f6aa9 to your computer and use it in GitHub Desktop.

Select an option

Save dumbmoron/59baad563a18828f8801e06f141f6aa9 to your computer and use it in GitHub Desktop.
window.k = (() => {
const p = [
['٩', '۶'],
['o', 'o'],
['☆*:.。.o', 'o.。.:*☆'],
['。゚', '゚。'],
['⸜', '⸝'],
['', 'ノ~ ♡'],
['╰', '╯♡'],
['┌∩┐', '┌∩┐'],
['.・゚゚・', '・゚゚・.']
]
const i = [
['* ', ''],
['', ' *'],
['。 ', ''],
['', ' 。'],
['o', 'o'],
['@', ''],
['´', '`'],
['`', '´'],
['„', '„'],
['⁄⁄', '⁄⁄']
]
const e = [ '^^', '´`', '◕◕', '≧≦', '⌒⌒', ' ̄ ̄', '・・', '••', '──', '▔▔', '✯✯', '⁰⁰', 'μμ', '><', 'ᗒᗕ', '눈눈', 'uu' ]
const m = [ 'w', 'ω', '∀', '‿', '▽', '︶', '人', 'ヮ', 'ᗜ', 'ε', '3', '_', 'Д', 'д', '益', '﹏', '︿' ]
const b = [ '()', '[]', '【】', '{}', '〔〕', ' ' ]
const x = z => z[Math.floor(Math.random() * z.length)]
const n = z => Math.random() < 0.5 ? ['', ''] : x(z)
const c = () => 2 - Math.max(0, Math.floor(Math.log10(Math.random() * 1000)))
const r = (c, z, s = '') => {
if (c === undefined)
return s
const [ x, y ] = c()
return r(z.pop(), z, [x, s, y || ''].join([]))
}
const w = (a, f) => () => f(a)
return () => r(
w(m, x),
[
w(p, n), w(b, x), () => {
const z = Array(c()).fill(0).map(() => x(i))
let l = '', r = ''
for (const [q, y] of z) {
l += q
r = y + r
}
return [ l, r ]
}, w(e, x)
]
)
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment