lib-curses
Version:
Simple node.js library for work with console
17 lines (16 loc) • 726 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.print = print;
const addch_helper_1 = require("./addch.helper");
/**
* Prints a string to terminal at a specified position (x, y), followed by a newline.
*
* @param {any} string - String to be printed. This will be converted to a string, if necessary.
* @param {number} [x=-1] - Horizontal position (column) where string should be printed. Default is no specific position.
* @param {number} [y=-1] - Vertical position (row) where string should be printed. Default is no specific position.
* @returns {void}
*/
function print(string, x = -1, y = -1) {
string = String(string) + '\n';
(0, addch_helper_1.addch)(string, x, y);
}
;