How to use the boxen._borderStyles function in boxen

To help you get started, we’ve selected a few boxen examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sindresorhus / boxen-cli / cli.js View on Github external
function cleanupBorderStyle(borderStyle) {
	if (!borderStyle) {
		return 'single';
	}

	if (borderStyle in boxen._borderStyles) {
		return borderStyle;
	}

	if (borderStyle.length !== 6) {
		console.error('Specified custom border style is invalid');
		process.exit(1);
	}

	// a string of 6 characters was given, make it a borderStyle object
	return {
		topLeft: borderStyle[0],
		topRight: borderStyle[1],
		bottomLeft: borderStyle[2],
		bottomRight: borderStyle[3],
		horizontal: borderStyle[4],
		vertical: borderStyle[5]

boxen

Create boxes in the terminal

MIT
Latest version published 4 months ago

Package Health Score

82 / 100
Full package analysis