Skip to content

Instantly share code, notes, and snippets.

@kutyel
Created August 5, 2016 07:30
Show Gist options
  • Save kutyel/55ccc5f3eb45fabf3c8a41eb72de792e to your computer and use it in GitHub Desktop.
Save kutyel/55ccc5f3eb45fabf3c8a41eb72de792e to your computer and use it in GitHub Desktop.
Outputs a cat to the console!
((f, t, p) => {
/**
* Returns cat's face
*/
const face = (type) => {
switch (type) {
case 0:
return '( x .x)';
case 1:
return '( o .o)';
case 2:
return '( ^ .^)';
default:
return '( - .-)';
}
}
/**
* Draws cat
*/
((faceType = 2, tick = false, padding = '') => {
console.log('_,------,');
padding = tick ? ' ' : ' ';
console.log('_|' + padding + '/\\_/\\ ');
padding = tick ? '_' : '__';
console.log((tick ? '~' : '^') + '|' + padding + face(faceType) + ' ');
padding = tick ? ' ' : ' ';
console.log(padding + '"" "" ');
})(f, t, p);
})(+process.argv[2], !!process.argv[3], process.argv[4]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment