Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

buffer-pipe

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

buffer-pipe - npm Package Compare versions

Comparing version 0.0.0 to 0.0.1

.nyc_output/33410d50da5bac48b305f68aaf8e159c.json

14

API.md

@@ -8,5 +8,8 @@ <!-- Generated by documentation.js. Update this documentation by updating the source code. -->

- [write](#write)
- [end](#end)
## constructor
[index.js:8-10](https://github.com/wanderer/buffer-pipe/blob/54caadc458ca1ac4c3d5d42c945f09165d3f15cd/index.js#L8-L10 "Source code on GitHub")
Creates a new instance of a pipe

@@ -20,2 +23,4 @@

[index.js:17-21](https://github.com/wanderer/buffer-pipe/blob/54caadc458ca1ac4c3d5d42c945f09165d3f15cd/index.js#L17-L21 "Source code on GitHub")
read `num` number of bytes from the pipe

@@ -31,2 +36,4 @@

[index.js:27-30](https://github.com/wanderer/buffer-pipe/blob/54caadc458ca1ac4c3d5d42c945f09165d3f15cd/index.js#L27-L30 "Source code on GitHub")
Wites a buffer to the pipe

@@ -37,1 +44,8 @@

- `buf` **[Buffer](https://nodejs.org/api/buffer.html)**
## end
[index.js:36-38](https://github.com/wanderer/buffer-pipe/blob/54caadc458ca1ac4c3d5d42c945f09165d3f15cd/index.js#L36-L38 "Source code on GitHub")
Whether or not there is more data to read from the buffer
returns {Boolean}

@@ -31,2 +31,10 @@ const Buffer = require('safe-buffer').Buffer

}
/**
* Whether or not there is more data to read from the buffer
* returns {Boolean}
*/
get end () {
return !this.buffer.length
}
}

6

package.json
{
"name": "buffer-pipe",
"version": "0.0.0",
"version": "0.0.1",
"description": "A simple pipe for buffers",

@@ -8,3 +8,3 @@ "main": "index.js",

"coveralls": "npm run coverage && nyc report --reporter=text-lcov | coveralls",
"coverage": "nyc npm test",
"coverage": "nyc node ./tests/index.js",
"lint": "standard",

@@ -24,3 +24,3 @@ "test": "node ./tests/index.js"

"istanbul": "^0.4.1",
"nyc": "^11.2.1",
"nyc": "^11.3.0",
"standard": "^10.0.0",

@@ -27,0 +27,0 @@ "tape": "^4.0.3"

# SYNOPSIS
[![NPM Package](https://img.shields.io/npm/v/buffer-pipe.svg?style=flat-square)](https://www.npmjs.org/package/buffer-pipe)

@@ -29,2 +30,4 @@ [![Build Status](https://img.shields.io/travis/wanderer/buffer-pipe.svg?branch=master&style=flat-square)](https://travis-ci.org/wanderer/buffer-pipe)

[index.js:8-10](https://github.com/wanderer/buffer-pipe/blob/54caadc458ca1ac4c3d5d42c945f09165d3f15cd/index.js#L8-L10 "Source code on GitHub")
Creates a new instance of a pipe

@@ -34,6 +37,8 @@

- `buf` **[Buffer](https://nodejs.org/api/buffer.html)** an buffer to start with (optional, default `Buffer.from([])`)
- `buf` **[Buffer](https://nodejs.org/api/buffer.html)** an optional buffer to start with (optional, default `Buffer.from([])`)
## read
[index.js:17-21](https://github.com/wanderer/buffer-pipe/blob/54caadc458ca1ac4c3d5d42c945f09165d3f15cd/index.js#L17-L21 "Source code on GitHub")
read `num` number of bytes from the pipe

@@ -49,2 +54,4 @@

[index.js:27-30](https://github.com/wanderer/buffer-pipe/blob/54caadc458ca1ac4c3d5d42c945f09165d3f15cd/index.js#L27-L30 "Source code on GitHub")
Wites a buffer to the pipe

@@ -56,3 +63,12 @@

## end
[index.js:36-38](https://github.com/wanderer/buffer-pipe/blob/54caadc458ca1ac4c3d5d42c945f09165d3f15cd/index.js#L36-L38 "Source code on GitHub")
Whether or not there is more data to read from the buffer
returns {Boolean}
# LICENSE
[MPL-2.0](https://tldrlegal.com/license/mozilla-public-license-2.0-(mpl-2))
[MPL-2.0][LICENSE]
[LICENSE]: https://tldrlegal.com/license/mozilla-public-license-2.0-(mpl-2)

@@ -13,2 +13,3 @@ const tape = require('tape')

t.deepEquals(buf, Buffer.from([1, 2, 3]))
t.equal(p.end, false)

@@ -15,0 +16,0 @@ p = new Pipe()

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