UNPKG

full-width-of-terminal

Version:

The string is displayed on the full width of the terminal.

11 lines (7 loc) 245 B
// 'use strict' const columns = require('./columns').getColumns() exports.getStringFullWidthOfTerminal = (str = '-') => { const size = Math.ceil(columns / str.length) return str.repeat(size + 1).substr(0, columns) }