# console-clear

> Clear the console, cross-platform

Latest version **1.1.1** (published 2018-09-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install console-clear
pnpm add console-clear
yarn add console-clear
bun add console-clear
```

## Health

**Score 18/100 (F)** — status: abandoned.

Positive: has types package; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2018-09-25 |
| First published | 2017-07-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/console-clear) |
| Module format | CommonJS |
| Node | >=4 |
| Dependencies | 0 |
| Unpacked size | 2.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 23 |
| Author | Luke Edwards |
| Maintainers | lukeed |
| Keywords | cli, term, shell, console, terminal, clear, reset |

## Links

- npm: https://www.npmjs.com/package/console-clear
- Repository: https://github.com/lukeed/console-clear
- Homepage: https://github.com/lukeed/console-clear#readme
- Issues: https://github.com/lukeed/console-clear/issues
- npm.io page: https://npm.io/package/console-clear

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 1.1.1 (latest) — 2018-09-25
- 1.1.0 — 2018-01-21
- 1.0.0 — 2017-07-20

## README

# console-clear

> Clear the console, cross-platform


## Install

```
$ npm install --save console-clear
```


## Usage

```js
const clear = require('console-clear');

clear(true);
//=> allow scrollback

clear();
//=> no scrollback, if supported
```


## API

### clear(keepHistory)

#### keepHistory

Type: `boolean`<br>
Default: `false`

Clears the console, but keeps the scrollback history intact.

> **For Windows:** This may be the *only* behavior available. <br>ANSI control sequences, like clearing the scrollback buffer, are [only handled in _recent_ versions of the native Windows console host](http://www.nivot.org/blog/post/2016/02/04/Windows-10-TH2-(v1511)-Console-Host-Enhancements).

## License

MIT © [Luke Edwards](https://lukeed.com)

---
_Source: https://npm.io/package/console-clear · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
