UNPKG

terminal-char-width

Version:

Get the char width/height proportions in different terminal emulators.

8 lines (6 loc) 236 B
"use strict"; var isWindows = require("is-windows"); // TODO This probably needs to be improved by checking the // terminal type and fonts. But it's good enough for an // initial version. :D module.exports = isWindows() ? 0.714 : 0.5;