Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Feb 28, 2024 via pnpm

mute-stream 0.0.8

Bytes go in, but they don't come out (when muted).
Package summary
Share
0
issues
1
license
1
ISC
Package created
24 Jul 2012
Version published
28 Dec 2018
Maintainers
5
Total deps
1
Direct deps
0
License
ISC

Issues

0
This package has no issues

Licenses

ISC License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
mute-stream@0.0.8
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of mute-stream 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does mute-stream do?

"Mute-stream" is a utility within the npm package ecosystem, primarily used to manage the flow of data across streams. Its main functionality revolves around acting as a pass-through stream, which essentially means that bytes can move into it seamlessly. However, the noteworthy feature of "mute-stream" is that when it is put into a 'mute' state, it drops the incoming bytes silently instead of directing them through the stream. This provides developers a convenient way of filtering data through streams based on certain conditions.

How do you use mute-stream?

To interact with "mute-stream", it must first be required into your JavaScript file. Following this, you can create a new instance of MuteStream and manage the flow of data via the .write() method. This method writes given input to the standard output (stdout). However, if a .mute() call is made prior to invoking the .write() method, the entered data will not be written. To resume writing, the .unmute() call should be used. Here's an example of how this works:

const MuteStream = require('mute-stream');

const ms = new MuteStream();

ms.pipe(process.stdout);
ms.write('foo'); // Outputs 'foo' to stdout
ms.mute();
ms.write('bar'); // Does not output 'bar'
ms.unmute();
ms.write('baz'); // Outputs 'baz' to stdout

In addition, you can use the mute-stream instance to filter incoming data:

const ms = new MuteStream();

input.pipe(ms);

ms.on('data', function (c) {
    console.log('data: ' + c);
});

input.emit('data', 'foo'); // Logs 'foo'
ms.mute();
input.emit('data', 'bar'); // Does not log 'bar'
ms.unmute();
input.emit('data', 'baz'); // Logs 'baz'

Where are the mute-stream docs?

The documentation and detailed description of "mute-stream" can primarily be found within its README file on the GitHub repository, located at https://github.com/npm/mute-stream.git. The README comprises an explanation of how "mute-stream" works, its usage, options, and available methods. For a more comprehensive understanding, the source code of "mute-stream" can also be referred to as it offers real-world examples of how the utility can be integrated within coding projects.