4.0.0 • Published 2 years ago

term-size v4.0.0

Weekly downloads
9,903,374
License
MIT
Repository
github
Last release
2 years ago

term-size

Reliably get the terminal window size

Because process.stdout.columns doesn't exist when run non-interactively, for example, in a child process or when piped. This module even works when all the TTY file descriptors are redirected!

Confirmed working on macOS, Linux, and Windows.

Install

$ npm install term-size

Usage

import terminalSize from 'term-size';

terminalSize();
//=> {columns: 143, rows: 24}

API

terminalSize()

Returns an object with columns and rows properties.

Info

The bundled macOS binary is signed and hardened.

Related


archetype-libraryreact-native-bluetooth2killi8n-react-native-fast-imagemangareader-dl@cashremit/cr-streamline-iconsterminal-alarm@imba/stdioboot-cli-cljs-tempdummy-sub-talos-toolsairscanairscan-examplereact-native-esc-pos-sahaab@borisovart/atol-kkt-modulediscord-music-botsunblock-block-save-variables@everything-registry/sub-chunk-2890lapture-ui-complaptureuisync-monorepo-packagestablurterm-size-cliterminal-jumpertechniconsolesuperset-plugin-chart-hello-world2sui-monorepospotitermspgisticky-scroll-catchthanksvoxgenvite_vue3_ts_ssssdddddyyyy@poscredit/plugin-chart-boris@youngseokangg/common-bundlegenerator-bootstrap-boilerplate-templateitroniquotes-cliip-designkenar-admin-cliiloahw9image-outputi18next-cleanuphubot-budagulp-reporterhow2-clihistifyhexyun.helpershhtermkitdupgroksyinquirer-table-select-promptinteractive-diff-patchlf-ui-kitleximavenlocaldev-tuiluban-changesetlq-server-clim2m-chartjs-plugin-crosshairlainan-apikubitkommmit@whodunit/investigator@warpjs/admin@wuxh/changesets-cli@tuannm301198/changeset-test@theurgi/help@tripsj/quotes_terminal@types/term-size@unflakable/cypress-plugin@tonysusi/vapid@unofficial-parcel-nightly/parcel-reporter-cli@use-pluto/satellite@vandai-nguyen/module_test@vitali_shcherbina/styled-lib@yplabs-ltd/react-native-detector@tensei/clialarm-cliagenda-cliaircat-webadonis-ally-figmaall-repos-cliashish-bagdane@parcel/reporter-cliforceable-ttyfront3funding@superjump/assetpack-core@superset-plugins-sm/superset-plugin-chart-hello-world@superreal/octopuseplogeventil-clifhir2fields-cli6s@abidibo/js-word-event@abizzle/changesets-cli@bitgorust/changesets-cli@blkmarketco/components-library@boost/terminal@carllewi2/sapcdc-ally-driver@chauhan-rakesh/cardjs
4.0.0

2 years ago

3.0.2

4 years ago

3.0.1

4 years ago

3.0.0

4 years ago

2.2.1

5 years ago

2.2.0

6 years ago

2.1.1

6 years ago

2.1.0

7 years ago

2.0.0

7 years ago

1.2.0

8 years ago

1.1.0

9 years ago

1.0.0

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago