aboutsummaryrefslogtreecommitdiff
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/index.js3
-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.json100
-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.json25
9 files changed, 236 insertions, 13 deletions
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
index ea8d112f98..2c07e957a3 100644
--- a/deps/npm/node_modules/mississippi/node_modules/stream-each/index.js
+++ b/deps/npm/node_modules/mississippi/node_modules/stream-each/index.js
@@ -1,4 +1,5 @@
var eos = require('end-of-stream')
+var shift = require('stream-shift')
module.exports = each
@@ -41,7 +42,7 @@ function each (stream, fn, cb) {
if (ended || running) return
want = false
- var data = stream.read()
+ var data = shift(stream)
if (!data) {
want = true
return
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
new file mode 100644
index 0000000000..3c3629e647
--- /dev/null
+++ b/deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/.npmignore
@@ -0,0 +1 @@
+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
new file mode 100644
index 0000000000..ecd4193f60
--- /dev/null
+++ b/deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/.travis.yml
@@ -0,0 +1,6 @@
+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
new file mode 100644
index 0000000000..bae9da7bfa
--- /dev/null
+++ b/deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/LICENSE
@@ -0,0 +1,21 @@
+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
new file mode 100644
index 0000000000..d9cc2d945f
--- /dev/null
+++ b/deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/README.md
@@ -0,0 +1,25 @@
+# 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
new file mode 100644
index 0000000000..c4b18b9c2a
--- /dev/null
+++ b/deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/index.js
@@ -0,0 +1,20 @@
+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
new file mode 100644
index 0000000000..54bd23eb8e
--- /dev/null
+++ b/deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/package.json
@@ -0,0 +1,100 @@
+{
+ "_args": [
+ [
+ {
+ "raw": "stream-shift@^1.0.0",
+ "scope": null,
+ "escapedName": "stream-shift",
+ "name": "stream-shift",
+ "rawSpec": "^1.0.0",
+ "spec": ">=1.0.0 <2.0.0",
+ "type": "range"
+ },
+ "/Users/zkat/Documents/code/npm/node_modules/mississippi/node_modules/duplexify"
+ ],
+ [
+ {
+ "raw": "stream-shift@^1.0.0",
+ "scope": null,
+ "escapedName": "stream-shift",
+ "name": "stream-shift",
+ "rawSpec": "^1.0.0",
+ "spec": ">=1.0.0 <2.0.0",
+ "type": "range"
+ },
+ "/Users/zkat/Documents/code/npm/node_modules/mississippi/node_modules/stream-each"
+ ]
+ ],
+ "_from": "stream-shift@^1.0.0",
+ "_id": "stream-shift@1.0.0",
+ "_inCache": true,
+ "_location": "/mississippi/stream-each/stream-shift",
+ "_nodeVersion": "4.4.3",
+ "_npmOperationalInternal": {
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/stream-shift-1.0.0.tgz_1468011662152_0.6510484367609024"
+ },
+ "_npmUser": {
+ "name": "mafintosh",
+ "email": "mathiasbuus@gmail.com"
+ },
+ "_npmVersion": "2.15.9",
+ "_phantomChildren": {},
+ "_requested": {
+ "raw": "stream-shift@^1.0.0",
+ "scope": null,
+ "escapedName": "stream-shift",
+ "name": "stream-shift",
+ "rawSpec": "^1.0.0",
+ "spec": ">=1.0.0 <2.0.0",
+ "type": "range"
+ },
+ "_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"
+ },
+ "bugs": {
+ "url": "https://github.com/mafintosh/stream-shift/issues"
+ },
+ "dependencies": {},
+ "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"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "d5c752825e5367e786f78e18e445ea223a155952",
+ "tarball": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz"
+ },
+ "gitHead": "2ea5f7dcd8ac6babb08324e6e603a3269252a2c4",
+ "homepage": "https://github.com/mafintosh/stream-shift",
+ "license": "MIT",
+ "main": "index.js",
+ "maintainers": [
+ {
+ "name": "mafintosh",
+ "email": "mathiasbuus@gmail.com"
+ }
+ ],
+ "name": "stream-shift",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "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
new file mode 100644
index 0000000000..c0222c37d5
--- /dev/null
+++ b/deps/npm/node_modules/mississippi/node_modules/stream-each/node_modules/stream-shift/test.js
@@ -0,0 +1,48 @@
+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
index d73cd30d82..f8594afda6 100644
--- a/deps/npm/node_modules/mississippi/node_modules/stream-each/package.json
+++ b/deps/npm/node_modules/mississippi/node_modules/stream-each/package.json
@@ -14,19 +14,19 @@
]
],
"_from": "stream-each@>=1.1.0 <2.0.0",
- "_id": "stream-each@1.1.2",
+ "_id": "stream-each@1.2.0",
"_inCache": true,
"_location": "/mississippi/stream-each",
- "_nodeVersion": "4.2.3",
+ "_nodeVersion": "4.6.1",
"_npmOperationalInternal": {
- "host": "packages-5-east.internal.npmjs.com",
- "tmp": "tmp/stream-each-1.1.2.tgz_1454600601831_0.7560806761030108"
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/stream-each-1.2.0.tgz_1478427484733_0.5437065886799246"
},
"_npmUser": {
"name": "mafintosh",
"email": "mathiasbuus@gmail.com"
},
- "_npmVersion": "2.14.7",
+ "_npmVersion": "2.15.9",
"_phantomChildren": {},
"_requested": {
"raw": "stream-each@^1.1.0",
@@ -40,8 +40,8 @@
"_requiredBy": [
"/mississippi"
],
- "_resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.1.2.tgz",
- "_shasum": "7d4f887f24c721ab0155b12a34263d8732ad8d39",
+ "_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",
@@ -53,7 +53,8 @@
"url": "https://github.com/mafintosh/stream-each/issues"
},
"dependencies": {
- "end-of-stream": "^1.1.0"
+ "end-of-stream": "^1.1.0",
+ "stream-shift": "^1.0.0"
},
"description": "Iterate all the data in a stream",
"devDependencies": {
@@ -63,10 +64,10 @@
},
"directories": {},
"dist": {
- "shasum": "7d4f887f24c721ab0155b12a34263d8732ad8d39",
- "tarball": "https://registry.npmjs.org/stream-each/-/stream-each-1.1.2.tgz"
+ "shasum": "1e95d47573f580d814dc0ff8cd0f66f1ce53c991",
+ "tarball": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.0.tgz"
},
- "gitHead": "f0ef91ddbe95688e376598b9959cab463c733b57",
+ "gitHead": "2968bf4f195641f5eda594c781a0b590776bc702",
"homepage": "https://github.com/mafintosh/stream-each",
"license": "MIT",
"main": "index.js",
@@ -94,5 +95,5 @@
"scripts": {
"test": "standard && tape test.js"
},
- "version": "1.1.2"
+ "version": "1.2.0"
}