UNPKG

the-moon

Version:
22 lines (18 loc) • 573 B
#!/usr/bin/env node 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)}─╯ `);