An open API service indexing awesome lists of open source software.

https://github.com/gulpjs/mute-stdout

Mute and unmute stdout
https://github.com/gulpjs/mute-stdout

Last synced: 8 months ago
JSON representation

Mute and unmute stdout

Awesome Lists containing this project

README

          





# mute-stdout

[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][ci-image]][ci-url] [![Coveralls Status][coveralls-image]][coveralls-url]

Mute and unmute stdout.

## Usage

```js
var stdout = require('mute-stdout');

stdout.mute();

console.log('will not print');

stdout.unmute();

console.log('will print');
```

## API

### mute()

Mutes the `process.stdout` stream by replacing the `write` method with a no-op function.

### unmute()

Unmutes the `process.stdout` stream by restoring the original `write` method.

## License

MIT

[downloads-image]: http://img.shields.io/npm/dm/mute-stdout.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/mute-stdout
[npm-image]: http://img.shields.io/npm/v/mute-stdout.svg?style=flat-square

[ci-url]: https://github.com/gulpjs/mute-stdout/actions?query=workflow:dev
[ci-image]: https://img.shields.io/github/workflow/status/gulpjs/mute-stdout/dev?style=flat-square

[coveralls-url]: https://coveralls.io/r/gulpjs/mute-stdout
[coveralls-image]: http://img.shields.io/coveralls/gulpjs/mute-stdout/master.svg