Skip to content

Instantly share code, notes, and snippets.

Sheng Hau shioju

Block or report user

Report or block shioju

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am shioju on github.
  • I am shioju (https://keybase.io/shioju) on keybase.
  • I have a public key ASBGBDfM1SbLi9kf2H_5gQQiOFIKS0h1Xu-c6trsq_C3VQo

To claim this, I am signing this object:

View makethisbig.js
const takeFunctions = (strings, func) => {
return func(strings);
}
takeFunctions`make this big${(strings) => strings.join("").toUpperCase()}`
// "MAKE THIS BIG"
View unbutt.js
const unbutt = (buzzwords) => {
const words = buzzwords.join('').split(',')
return (sentence) => {
for (word of words) {
sentence = sentence.replace(new RegExp(word, 'g'), 'butt')
}
return sentence;
}
}
@shioju
shioju / buttify.js
Last active Apr 9, 2018
Tagged Template Literals
View buttify.js
const buttify = (strings, ...values) => {
return strings.map((str, i) => {
return typeof values[i] === "undefined" ? str : str + values[i]
}).join("").replace("cloud", "butt")
}
const adjective = "awesome"
buttify`Gcloud is ${adjective}`
//Gbutt is awesome
You can’t perform that action at this time.