Socket
Book a DemoInstallSign in
Socket

node-pv

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-pv

The PipeView utility in JavaScript

latest
Source
npmnpm
Version
0.1.5
Version published
Maintainers
1
Created
Source

node-pv

A node.js implementation of the Pipe Viewer utility, useful for inspecting a pipe's traffic.

Example

$ cat /dev/random | pv >/dev/null
18.88MB  00:00:02  [9.59MB/s]^C

Usage

There's an excellent description on Peteris Krumins's blog: A Unix Utility You Should Know About: Pipe Viewer

$ source | pv [OPTIONS] | dest

$ pv [OPTIONS] <FILE> | dest

Options

  • -s, --size SIZE: Assume the total amount of data to be transferred is SIZE bytes
  • -N, --name NAME: Prefix the output information with NAME

Installation

$ npm install -g node-pv

JS API

var PV = require('node-pv');
var pv = PV({
  size: /* ... */,
  name: /* ... */
});

pv.on('info', function(str){
  process.stderr.write(str);
});

process.stdin.pipe(pv).pipe(process.stdout);

License

MIT

FAQs

Package last updated on 10 Jun 2016

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