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

pull-stream

Package Overview
Dependencies
Maintainers
1
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pull-stream - npm Package Compare versions

Comparing version 3.4.2 to 3.4.3

6

package.json
{
"name": "pull-stream",
"description": "minimal pull stream",
"version": "3.4.2",
"homepage": "https://github.com/dominictarr/pull-stream",
"version": "3.4.3",
"homepage": "https://pull-stream.github.io",
"repository": {
"type": "git",
"url": "git://github.com/dominictarr/pull-stream.git"
"url": "git://github.com/pull-stream/pull-stream.git"
},

@@ -10,0 +10,0 @@ "devDependencies": {

@@ -71,9 +71,8 @@ # pull-stream

```js
//a stream of 100 random numbers.
var i = 100
var random = function () {
//a stream of random numbers.
function random (n) {
return function (end, cb) {
if(end) return cb(end)
//only read 100 times
if(i-- < 0) return cb(true)
//only read n times, then stop.
if(0<--n) return cb(true)
cb(null, Math.random())

@@ -96,3 +95,3 @@ }

//read source and log it.
var logger = function () {
function logger () {
return function (read) {

@@ -113,3 +112,3 @@ read(null, function next(end, data) {

```js
var rand = random()
var rand = random(100)
var log = logger()

@@ -137,3 +136,3 @@

```js
var map = function (read, map) {
function map (read, map) {
//return a readable function!

@@ -328,1 +327,2 @@ return function (end, cb) {

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