summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/mississippi/node_modules/stream-each
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/mississippi/node_modules/stream-each')
-rw-r--r--deps/npm/node_modules/mississippi/node_modules/stream-each/.npmignore1
-rw-r--r--deps/npm/node_modules/mississippi/node_modules/stream-each/.travis.yml5
-rw-r--r--deps/npm/node_modules/mississippi/node_modules/stream-each/LICENSE21
-rw-r--r--deps/npm/node_modules/mississippi/node_modules/stream-each/README.md41
-rw-r--r--deps/npm/node_modules/mississippi/node_modules/stream-each/collaborators.md7
-rw-r--r--deps/npm/node_modules/mississippi/node_modules/stream-each/index.js54
-rw-r--r--deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/.npmignore1
-rw-r--r--deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/.travis.yml6
-rw-r--r--deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/LICENSE21
-rw-r--r--deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/README.md25
-rw-r--r--deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/index.js20
-rw-r--r--deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/package.json56
-rw-r--r--deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/test.js48
-rw-r--r--deps/npm/node_modules/mississippi/node_modules/stream-each/package.json59
-rw-r--r--deps/npm/node_modules/mississippi/node_modules/stream-each/test.js82
15 files changed, 0 insertions, 447 deletions
diff --git a/deps/npm/node_modules/mississippi/node_modules/stream-each/.npmignore b/deps/npm/node_modules/mississippi/node_modules/stream-each/.npmignore
deleted file mode 100644
index 3c3629e647..0000000000
--- a/deps/npm/node_modules/mississippi/node_modules/stream-each/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-node_modules
diff --git a/deps/npm/node_modules/mississippi/node_modules/stream-each/.travis.yml b/deps/npm/node_modules/mississippi/node_modules/stream-each/.travis.yml
deleted file mode 100644
index aa89858a8a..0000000000
--- a/deps/npm/node_modules/mississippi/node_modules/stream-each/.travis.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-language: node_js
-node_js:
- - '0.10'
- - '0.12'
- - 'stable'
diff --git a/deps/npm/node_modules/mississippi/node_modules/stream-each/LICENSE b/deps/npm/node_modules/mississippi/node_modules/stream-each/LICENSE
deleted file mode 100644
index 66a4d2a149..0000000000
--- a/deps/npm/node_modules/mississippi/node_modules/stream-each/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2015 Mathias Buus
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/deps/npm/node_modules/mississippi/node_modules/stream-each/README.md b/deps/npm/node_modules/mississippi/node_modules/stream-each/README.md
deleted file mode 100644
index e0832d55bd..0000000000
--- a/deps/npm/node_modules/mississippi/node_modules/stream-each/README.md
+++ /dev/null
@@ -1,41 +0,0 @@
-# stream-each
-
-Iterate all the data in a stream
-
-```
-npm install stream-each
-```
-
-[![build status](http://img.shields.io/travis/mafintosh/stream-each.svg?style=flat)](http://travis-ci.org/mafintosh/stream-each)
-
-## Usage
-
-``` js
-var each = require('stream-each')
-
-each(stream, function (data, next) {
- console.log('data from stream', data)
- // when ready to consume next chunk
- next()
-}, function (err) {
- console.log('no more data')
-})
-```
-
-## API
-
-#### `each(stream, iterator, cb)`
-
-Iterate the data in the stream by calling the iterator function with `(data, next)`
-where data is a data chunk and next is a callback. Call next when you are ready to
-consume the next chunk. Optionally you can call next with an error to destroy the stream
-
-When the stream ends/errors the callback is called if provided
-
-## License
-
-MIT
-
-## Related
-
-`stream-each` is part of the [mississippi stream utility collection](https://github.com/maxogden/mississippi) which includes more useful stream modules similar to this one.
diff --git a/deps/npm/node_modules/mississippi/node_modules/stream-each/collaborators.md b/deps/npm/node_modules/mississippi/node_modules/stream-each/collaborators.md
deleted file mode 100644
index fc16de25f9..0000000000
--- a/deps/npm/node_modules/mississippi/node_modules/stream-each/collaborators.md
+++ /dev/null
@@ -1,7 +0,0 @@
-## Collaborators
-
-stream-each is only possible due to the excellent work of the following collaborators:
-
-<table><tbody><tr><th align="left">maxogden</th><td><a href="https://github.com/maxogden">GitHub/maxogden</a></td></tr>
-<tr><th align="left">mafintosh</th><td><a href="https://github.com/mafintosh">GitHub/mafintosh</a></td></tr>
-</tbody></table>
diff --git a/deps/npm/node_modules/mississippi/node_modules/stream-each/index.js b/deps/npm/node_modules/mississippi/node_modules/stream-each/index.js
deleted file mode 100644
index 2c07e957a3..0000000000
--- a/deps/npm/node_modules/mississippi/node_modules/stream-each/index.js
+++ /dev/null
@@ -1,54 +0,0 @@
-var eos = require('end-of-stream')
-var shift = require('stream-shift')
-
-module.exports = each
-
-function each (stream, fn, cb) {
- var want = true
- var error = null
- var ended = false
- var running = false
-
- stream.on('readable', onreadable)
- onreadable()
-
- if (cb) eos(stream, {readable: true, writable: false}, done)
- return stream
-
- function done (err) {
- if (!error) error = err
- ended = true
- if (!running) cb(error)
- }
-
- function onreadable () {
- if (want) read()
- }
-
- function afterRead (err) {
- running = false
-
- if (err) {
- error = err
- if (ended) return cb(error)
- stream.destroy(err)
- return
- }
- if (ended) return cb(error)
- read()
- }
-
- function read () {
- if (ended || running) return
- want = false
-
- var data = shift(stream)
- if (!data) {
- want = true
- return
- }
-
- running = true
- fn(data, afterRead)
- }
-}
diff --git a/deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/.npmignore b/deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/.npmignore
deleted file mode 100644
index 3c3629e647..0000000000
--- a/deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-node_modules
diff --git a/deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/.travis.yml b/deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/.travis.yml
deleted file mode 100644
index ecd4193f60..0000000000
--- a/deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/.travis.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-language: node_js
-node_js:
- - "0.10"
- - "0.12"
- - "4"
- - "6"
diff --git a/deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/LICENSE b/deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/LICENSE
deleted file mode 100644
index bae9da7bfa..0000000000
--- a/deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2016 Mathias Buus
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/README.md b/deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/README.md
deleted file mode 100644
index d9cc2d945f..0000000000
--- a/deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/README.md
+++ /dev/null
@@ -1,25 +0,0 @@
-# stream-shift
-
-Returns the next buffer/object in a stream's readable queue
-
-```
-npm install stream-shift
-```
-
-[![build status](http://img.shields.io/travis/mafintosh/stream-shift.svg?style=flat)](http://travis-ci.org/mafintosh/stream-shift)
-
-## Usage
-
-``` js
-var shift = require('stream-shift')
-
-console.log(shift(someStream)) // first item in its buffer
-```
-
-## Credit
-
-Thanks [@dignifiedquire](https://github.com/dignifiedquire) for making this work on node 6
-
-## License
-
-MIT
diff --git a/deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/index.js b/deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/index.js
deleted file mode 100644
index c4b18b9c2a..0000000000
--- a/deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/index.js
+++ /dev/null
@@ -1,20 +0,0 @@
-module.exports = shift
-
-function shift (stream) {
- var rs = stream._readableState
- if (!rs) return null
- return rs.objectMode ? stream.read() : stream.read(getStateLength(rs))
-}
-
-function getStateLength (state) {
- if (state.buffer.length) {
- // Since node 6.3.0 state.buffer is a BufferList not an array
- if (state.buffer.head) {
- return state.buffer.head.data.length
- }
-
- return state.buffer[0].length
- }
-
- return state.length
-}
diff --git a/deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/package.json b/deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/package.json
deleted file mode 100644
index 19af8093a1..0000000000
--- a/deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/package.json
+++ /dev/null
@@ -1,56 +0,0 @@
-{
- "_from": "stream-shift@^1.0.0",
- "_id": "stream-shift@1.0.0",
- "_integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=",
- "_location": "/mississippi/stream-each/stream-shift",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "stream-shift@^1.0.0",
- "name": "stream-shift",
- "escapedName": "stream-shift",
- "rawSpec": "^1.0.0",
- "saveSpec": null,
- "fetchSpec": "^1.0.0"
- },
- "_requiredBy": [
- "/mississippi/stream-each"
- ],
- "_resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz",
- "_shasum": "d5c752825e5367e786f78e18e445ea223a155952",
- "_shrinkwrap": null,
- "_spec": "stream-shift@^1.0.0",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/mississippi/node_modules/stream-each",
- "author": {
- "name": "Mathias Buus",
- "url": "@mafintosh"
- },
- "bin": null,
- "bugs": {
- "url": "https://github.com/mafintosh/stream-shift/issues"
- },
- "bundleDependencies": false,
- "dependencies": {},
- "deprecated": false,
- "description": "Returns the next buffer/object in a stream's readable queue",
- "devDependencies": {
- "standard": "^7.1.2",
- "tape": "^4.6.0",
- "through2": "^2.0.1"
- },
- "homepage": "https://github.com/mafintosh/stream-shift",
- "license": "MIT",
- "main": "index.js",
- "name": "stream-shift",
- "optionalDependencies": {},
- "peerDependencies": {},
- "repository": {
- "type": "git",
- "url": "git+https://github.com/mafintosh/stream-shift.git"
- },
- "scripts": {
- "test": "standard && tape test.js"
- },
- "version": "1.0.0"
-}
diff --git a/deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/test.js b/deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/test.js
deleted file mode 100644
index c0222c37d5..0000000000
--- a/deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/test.js
+++ /dev/null
@@ -1,48 +0,0 @@
-var tape = require('tape')
-var through = require('through2')
-var stream = require('stream')
-var shift = require('./')
-
-tape('shifts next', function (t) {
- var passthrough = through()
-
- passthrough.write('hello')
- passthrough.write('world')
-
- t.same(shift(passthrough), Buffer('hello'))
- t.same(shift(passthrough), Buffer('world'))
- t.end()
-})
-
-tape('shifts next with core', function (t) {
- var passthrough = stream.PassThrough()
-
- passthrough.write('hello')
- passthrough.write('world')
-
- t.same(shift(passthrough), Buffer('hello'))
- t.same(shift(passthrough), Buffer('world'))
- t.end()
-})
-
-tape('shifts next with object mode', function (t) {
- var passthrough = through({objectMode: true})
-
- passthrough.write({hello: 1})
- passthrough.write({world: 1})
-
- t.same(shift(passthrough), {hello: 1})
- t.same(shift(passthrough), {world: 1})
- t.end()
-})
-
-tape('shifts next with object mode with core', function (t) {
- var passthrough = stream.PassThrough({objectMode: true})
-
- passthrough.write({hello: 1})
- passthrough.write({world: 1})
-
- t.same(shift(passthrough), {hello: 1})
- t.same(shift(passthrough), {world: 1})
- t.end()
-})
diff --git a/deps/npm/node_modules/mississippi/node_modules/stream-each/package.json b/deps/npm/node_modules/mississippi/node_modules/stream-each/package.json
deleted file mode 100644
index 39f4cd01f4..0000000000
--- a/deps/npm/node_modules/mississippi/node_modules/stream-each/package.json
+++ /dev/null
@@ -1,59 +0,0 @@
-{
- "_from": "stream-each@^1.1.0",
- "_id": "stream-each@1.2.0",
- "_integrity": "sha1-HpXUdXP1gNgU3A/4zQ9m8c5TyZE=",
- "_location": "/mississippi/stream-each",
- "_phantomChildren": {},
- "_requested": {
- "type": "range",
- "registry": true,
- "raw": "stream-each@^1.1.0",
- "name": "stream-each",
- "escapedName": "stream-each",
- "rawSpec": "^1.1.0",
- "saveSpec": null,
- "fetchSpec": "^1.1.0"
- },
- "_requiredBy": [
- "/mississippi"
- ],
- "_resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.0.tgz",
- "_shasum": "1e95d47573f580d814dc0ff8cd0f66f1ce53c991",
- "_shrinkwrap": null,
- "_spec": "stream-each@^1.1.0",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/mississippi",
- "author": {
- "name": "Mathias Buus",
- "url": "@mafintosh"
- },
- "bin": null,
- "bugs": {
- "url": "https://github.com/mafintosh/stream-each/issues"
- },
- "bundleDependencies": false,
- "dependencies": {
- "end-of-stream": "^1.1.0",
- "stream-shift": "^1.0.0"
- },
- "deprecated": false,
- "description": "Iterate all the data in a stream",
- "devDependencies": {
- "standard": "^5.3.1",
- "tape": "^4.2.1",
- "through2": "^2.0.0"
- },
- "homepage": "https://github.com/mafintosh/stream-each",
- "license": "MIT",
- "main": "index.js",
- "name": "stream-each",
- "optionalDependencies": {},
- "peerDependencies": {},
- "repository": {
- "type": "git",
- "url": "git+https://github.com/mafintosh/stream-each.git"
- },
- "scripts": {
- "test": "standard && tape test.js"
- },
- "version": "1.2.0"
-}
diff --git a/deps/npm/node_modules/mississippi/node_modules/stream-each/test.js b/deps/npm/node_modules/mississippi/node_modules/stream-each/test.js
deleted file mode 100644
index 36454c45eb..0000000000
--- a/deps/npm/node_modules/mississippi/node_modules/stream-each/test.js
+++ /dev/null
@@ -1,82 +0,0 @@
-var tape = require('tape')
-var through = require('through2')
-var each = require('./')
-
-tape('each', function (t) {
- var s = through.obj()
- s.write('a')
- s.write('b')
- s.write('c')
- s.end()
-
- s.on('end', function () {
- t.end()
- })
-
- var expected = ['a', 'b', 'c']
- each(s, function (data, next) {
- t.same(data, expected.shift())
- next()
- })
-})
-
-tape('each and callback', function (t) {
- var s = through.obj()
- s.write('a')
- s.write('b')
- s.write('c')
- s.end()
-
- var expected = ['a', 'b', 'c']
- each(s, function (data, next) {
- t.same(data, expected.shift())
- next()
- }, function () {
- t.end()
- })
-})
-
-tape('each (write after)', function (t) {
- var s = through.obj()
- s.on('end', function () {
- t.end()
- })
-
- var expected = ['a', 'b', 'c']
- each(s, function (data, next) {
- t.same(data, expected.shift())
- next()
- })
-
- setTimeout(function () {
- s.write('a')
- s.write('b')
- s.write('c')
- s.end()
- }, 100)
-})
-
-tape('each error', function (t) {
- var s = through.obj()
- s.write('hello')
- s.on('error', function (err) {
- t.same(err.message, 'stop')
- t.end()
- })
-
- each(s, function (data, next) {
- next(new Error('stop'))
- })
-})
-
-tape('each error and callback', function (t) {
- var s = through.obj()
- s.write('hello')
-
- each(s, function (data, next) {
- next(new Error('stop'))
- }, function (err) {
- t.same(err.message, 'stop')
- t.end()
- })
-})