package/package.json000644 0000001620 13336120025011557 0ustar00000000 000000 { "name": "mute-stdout", "version": "1.0.1", "description": "Mute and unmute stdout.", "author": "Gulp Team (http://gulpjs.com/)", "contributors": [ "Blaine Bublitz " ], "repository": "gulpjs/mute-stdout", "license": "MIT", "engines": { "node": ">= 0.10" }, "main": "index.js", "files": [ "LICENSE", "index.js" ], "scripts": { "lint": "eslint .", "pretest": "npm run lint", "test": "mocha --async-only", "cover": "istanbul cover _mocha --report lcovonly", "coveralls": "npm run cover && istanbul-coveralls" }, "dependencies": {}, "devDependencies": { "eslint": "^2.13.0", "eslint-config-gulp": "^3.0.1", "expect": "^1.20.2", "istanbul": "^0.4.3", "istanbul-coveralls": "^1.0.3", "mocha": "^3.5.3" }, "keywords": [ "mute", "silence is golden", "stdout" ] } package/index.js000644 0000000474 13336117015010751 0ustar00000000 000000 'use strict'; var ogWrite = process.stdout.write; var muteStdout = { mute: mute, unmute: noop }; function noop() {} function mute() { muteStdout.unmute = unmute; process.stdout.write = noop; } function unmute() { process.stdout.write = ogWrite; muteStdout.unmute = noop; } module.exports = muteStdout; package/LICENSE000644 0000002177 13336113257010317 0ustar00000000 000000 The MIT License (MIT) Copyright (c) 2015, 2018 Blaine Bublitz and Eric Schoffstall Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. package/README.md000644 0000003060 13336114317010557 0ustar00000000 000000

# mute-stdout [![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Travis Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-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 [npm-url]: https://www.npmjs.com/package/mute-stdout [npm-image]: http://img.shields.io/npm/v/mute-stdout.svg [travis-url]: https://travis-ci.org/gulpjs/mute-stdout [travis-image]: http://img.shields.io/travis/gulpjs/mute-stdout.svg?label=travis-ci [appveyor-url]: https://ci.appveyor.com/project/gulpjs/mute-stdout [appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/mute-stdout.svg?label=appveyor [coveralls-url]: https://coveralls.io/r/gulpjs/mute-stdout [coveralls-image]: http://img.shields.io/coveralls/gulpjs/mute-stdout/master.svg [gitter-url]: https://gitter.im/gulpjs/gulp [gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg