Skip to content

Instantly share code, notes, and snippets.

@chee
Forked from rowanmanning/bigify.js
Last active August 14, 2018 13:36
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 chee/5c3317f399170a5ab7f3695928489c4d to your computer and use it in GitHub Desktop.
Save chee/5c3317f399170a5ab7f3695928489c4d to your computer and use it in GitHub Desktop.
Bigify
#!/usr/bin/env node
charactermap = new Proxy({
' ': 'blank',
'?': 'question',
'!': 'exclamation'
}, {
get: (object, key) =>
key in object
? object[key]
: `b${key.toLowerCase()}`
}
)
bigify = letters =>
Array.from(letters).map(letter => `:${charactermap[letter]}:`).join('')
letters = process.argv.slice(2).join(' ')
console.log(bigify(letters))
{
"name": "bigify",
"version": "1.1.0",
"bin": "./bigify.js"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment