New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

seal-countingstream

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

seal-countingstream

seal-countingstream counts the stream length in bytes.

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

seal-countingstream

CircleCI AppVeyor

seal-countingstream counts the stream length in bytes.

Installation

$ npm install seal-countingstream

Quick start

First you need to add a reference to seal-countingstream within your application.

const CountingStream = require('seal-countingstream');

Then, call the constructor function.

const countingstream = new CountingStream();

CountingStream is derived from the Transform stream and can be used like any such stream. To get the number of bytes piped through, call:

const numberOfStreamedBytes = countingstream.getCount(); // -> returns the number of bytes streamed so far

You can reset the counter any time.

countingstream.resetCount();

It is also possible to set the counter to an arbitrary value.

countingstream.resetCount(42);
countingstream.getCount(); // -> returns 42

Running the build

To build this module use roboter.

$ bot

FAQs

Package last updated on 08 Feb 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc