the-moon
Version:
š Show me the moon
22 lines (18 loc) ⢠573 B
JavaScript
process.on('unhandledRejection', console.error);
const moon = require('.');
const str = (content, length) => new Array(length + 1).join(content);
const name = moon({format: 'name'});
const icon = moon();
const length = name.length;
const half1 = Math.floor(length / 2);
const half2 = Math.ceil(length / 2);
console.log(`
āā${str('ā', length)}āā®
ā ${name} ā
āā${str('ā', length)}āā¤
ā ${str(' ', length)} ā
ā${str(' ', half1)}${icon} ${str(' ', half2)}ā
ā ${str(' ', length)} ā
ā°ā${str('ā', length)}āāÆ
`);