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

stream-array

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stream-array - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

23

index.js

@@ -0,4 +1,12 @@

'use strict'
var Readable = require('readable-stream').Readable
;
/**
* Create a new instance of StreamArray
*
* @access private
* @param {Array} list
*/
function StreamArray(list) {

@@ -17,2 +25,9 @@ if (!Array.isArray(list))

/**
* Read the next item from the source Array and push into NodeJS stream
* @access protected
* @desc Read the next item from the source Array and push into NodeJS stream
* @param {number} size The amount of data to read (ignored)
*/
StreamArray.prototype._read = function(size) {

@@ -22,4 +37,12 @@ this.push(this._i < this._l ? this._list[this._i++] : null);

/**
* Create a new instance of StreamArray
*
* @module stream-array
* @desc Push Array elements through a NodeJS stream
* @type {function}
* @param {Array} list An Array of objects, strings, numbers, etc
*/
module.exports = function(list) {
return new StreamArray(list);
};

20

package.json
{
"name": "stream-array",
"version": "1.1.1",
"version": "1.1.2",
"description": "Pipe an Array through Node.js streams",
"dependencies": {
"readable-stream": "~2.0.0"
"readable-stream": "~2.1.0"
},
"devDependencies": {
"concat-stream": "~1.5.0",
"tape": "~4.2.0"
"tape": "~4.5.0"
},

@@ -23,2 +23,3 @@ "scripts": {

},
"homepage": "https://github.com/mimetnet/node-stream-array",
"keywords": [

@@ -31,8 +32,3 @@ "array",

"author": "Matthew I. Metnetsky <matthew@cowarthill.com>",
"license": [
{
"type": "MIT",
"url": "http://opensource.org/licenses/MIT"
}
],
"license": "MIT",
"main": "index.js",

@@ -60,5 +56,5 @@ "directories": {

},
"engines": [
"node >= 0.8.0"
]
"engines": {
"node" : ">= 0.8"
}
}

3

README.md

@@ -10,2 +10,3 @@ # stream-array

[![devDependencies][7]][8]
[![Inch CI][16]][17]

@@ -75,2 +76,4 @@ [//]: [![testling][9]][10]

[15]: https://nodejs.org/api/stream.html#stream_readable_pipe_destination_options
[16]: https://inch-ci.org/github/mimetnet/node-stream-array.svg?branch=master
[17]: http://inch-ci.org/github/mimetnet/node-stream-array

@@ -77,0 +80,0 @@ ## License

@@ -9,10 +9,3 @@ var test = require('tape')

if (Object && 'function' === typeof(Object.observe)) {
// will produce ugly error, but also doesn't
// cause `covert` to detect an untested line
Object.observe(a, t.fail);
}
s = streamify(a);
s.pipe(concat({encoding: 'object'}, function(res) {

@@ -19,0 +12,0 @@ t.equal(1, arguments.length, 'concat returns 1 arg');

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