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

pull-pushable

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pull-pushable - npm Package Compare versions

Comparing version 2.1.2 to 2.2.0

3

index.js

@@ -53,3 +53,3 @@ module.exports = pullPushable

if (separated) {
return { push: push, end: end, source: read }
return { push: push, end: end, source: read, buffer: buffer }
}

@@ -60,2 +60,3 @@

read.end = end
read.buffer = buffer
return read

@@ -62,0 +63,0 @@

{
"name": "pull-pushable",
"description": "pull-stream with a push interface",
"version": "2.1.2",
"version": "2.2.0",
"homepage": "https://github.com/dominictarr/pull-pushable",

@@ -6,0 +6,0 @@ "repository": {

@@ -48,3 +48,3 @@ # pull-pushable

When giving the stream away and you don't want the user to have the `push`/`end` functions,
you can pass a `separated` option. It returns `{ push, end, source }`.
you can pass a `separated` option. It returns `{ push, end, source, buffer }`.

@@ -67,2 +67,5 @@ ```js

The current buffer array is exposed as `buffer` if you need to inspect or
manipulate it.
## License

@@ -69,0 +72,0 @@

@@ -13,2 +13,6 @@ var pull = require('pull-stream')

buf.push(1)
t.deepEqual(buf.buffer, [1])
pull(

@@ -25,3 +29,2 @@ buf,

buf.push(1)
buf.push(2)

@@ -33,5 +36,5 @@ buf.push(3)

test('pushable with separated functions', function (t) {
t.plan(3)
t.plan(4)
var { push, end, source } = pushable(true)
var { push, end, source, buffer } = pushable(true)

@@ -41,2 +44,7 @@ t.is(typeof source, 'function', 'is a function')

push(1)
push(2)
t.deepEqual(buffer, [1, 2])
pull(

@@ -51,6 +59,4 @@ source,

push(1)
push(2)
push(3)
end()
})
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