Link Search Menu Expand Document

Term

Table of contents

  1. Term
    1. Term.isatty(Number) -> Boolean
    2. Term.getSize() -> Number

Term

To make use of the Term module an import is required.

import Term;

Term.isatty(Number) -> Boolean

Returns a boolean indicating whether the file descriptor passed is attached to a tty.

Term.isatty(0);

Term.getSize() -> Number

Returns the number of rows, columns, horizontal and vertical pixels of the attached terminal.

Term.getSize();
print(Term.getSize());
// {"rows": 13, "columns": 145, "horizontal_pixels": 145, "vertical_pixels": 145}

This site uses Just The Docs, with modifications.