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
- Host: GitHub
- URL: https://github.com/gulpjs/mute-stdout
- Owner: gulpjs
- License: mit
- Created: 2015-08-21T21:54:23.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2021-11-22T23:13:02.000Z (over 4 years ago)
- Last Synced: 2025-10-15T16:31:48.755Z (8 months ago)
- Language: JavaScript
- Size: 13.7 KB
- Stars: 9
- Watchers: 5
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
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