Skip to content

Instantly share code, notes, and snippets.

@katai5plate
Last active February 18, 2019 06:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save katai5plate/3898510e6ed48e3365737d35b0a2a95e to your computer and use it in GitHub Desktop.
Save katai5plate/3898510e6ed48e3365737d35b0a2a95e to your computer and use it in GitHub Desktop.
俺の「ゆの in JavaScript」最終形
// 縛り内容:
// - eval 禁止
// - toString 禁止
// - "ひだまりスケッチ×" 直接入力禁止
// - "X / _ / X < 来週も見てくださいね!" の形を崩さない
((x,[y,z]=x.split(" < "),d="c0qc20c2fc3ac2qc4hc4kc513v".match(/.{2,3}/g).map(v=>parseInt(v,32))
)=>[...y].map((v,i)=>String.fromCharCode(v.charCodeAt()+d[i])).join("")+(d[2]-12002)+" "+z
)(
"X / _ / X < 来週も見てくださいね!"
)
// ------------------------------
const x=
"X / _ / X < 来週も見てくださいね!"
,[y,z]=x.split(" < "),d="c0qc20c2fc3ac2qc4hc4kc513v".match(/.{2,3}/g).map(v=>parseInt(v,32));
[...y].map((v,i)=>String.fromCharCode(v.charCodeAt()+d[i])).join("")+(d[2]-12002)+" "+z
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment