summaryrefslogtreecommitdiff
path: root/node_modules/stream-shift
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2026-05-18 23:10:59 +0800
committerlittleblack111 <littleblack11111@gmail.com>2026-05-18 23:41:44 +0800
commitfc87c009806dcc98867f6b58efe29b042aa01dee (patch)
tree8f59b3f4a5b66e9dfef2d40c8d318e258a521228 /node_modules/stream-shift
parent3336b2356ee6152d9c6ae59bd9b87ccbc0958407 (diff)
node: updatemain
Diffstat (limited to 'node_modules/stream-shift')
-rw-r--r--node_modules/stream-shift/.github/workflows/test.yml23
-rw-r--r--node_modules/stream-shift/LICENSE21
-rw-r--r--node_modules/stream-shift/README.md25
-rw-r--r--node_modules/stream-shift/index.js21
-rw-r--r--node_modules/stream-shift/package.json25
-rw-r--r--node_modules/stream-shift/test.js48
6 files changed, 0 insertions, 163 deletions
diff --git a/node_modules/stream-shift/.github/workflows/test.yml b/node_modules/stream-shift/.github/workflows/test.yml
deleted file mode 100644
index 9b94272e..00000000
--- a/node_modules/stream-shift/.github/workflows/test.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-name: Build Status
-on:
- push:
- branches:
- - master
- pull_request:
- branches:
- - master
-jobs:
- build:
- strategy:
- matrix:
- node-version: [lts/*]
- os: [ubuntu-latest, macos-latest, windows-latest]
- runs-on: ${{ matrix.os }}
- steps:
- - uses: actions/checkout@v3
- - name: Use Node.js ${{ matrix.node-version }}
- uses: actions/setup-node@v3
- with:
- node-version: ${{ matrix.node-version }}
- - run: npm install
- - run: npm test
diff --git a/node_modules/stream-shift/LICENSE b/node_modules/stream-shift/LICENSE
deleted file mode 100644
index bae9da7b..00000000
--- a/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/node_modules/stream-shift/README.md b/node_modules/stream-shift/README.md
deleted file mode 100644
index d9cc2d94..00000000
--- a/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/node_modules/stream-shift/index.js b/node_modules/stream-shift/index.js
deleted file mode 100644
index 566df888..00000000
--- a/node_modules/stream-shift/index.js
+++ /dev/null
@@ -1,21 +0,0 @@
-module.exports = shift
-
-function shift (stream) {
- var rs = stream._readableState
- if (!rs) return null
- return (rs.objectMode || typeof stream._duplexState === 'number') ? stream.read() : stream.read(getStateLength(rs))
-}
-
-function getStateLength (state) {
- if (state.buffer.length) {
- var idx = state.bufferIndex || 0
- // Since node 6.3.0 state.buffer is a BufferList not an array
- if (state.buffer.head) {
- return state.buffer.head.data.length
- } else if (state.buffer.length - idx > 0 && state.buffer[idx]) {
- return state.buffer[idx].length
- }
- }
-
- return state.length
-}
diff --git a/node_modules/stream-shift/package.json b/node_modules/stream-shift/package.json
deleted file mode 100644
index 8fe33011..00000000
--- a/node_modules/stream-shift/package.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "name": "stream-shift",
- "version": "1.0.3",
- "description": "Returns the next buffer/object in a stream's readable queue",
- "main": "index.js",
- "dependencies": {},
- "devDependencies": {
- "standard": "^7.1.2",
- "tape": "^4.6.0",
- "through2": "^2.0.1"
- },
- "scripts": {
- "test": "standard && tape test.js"
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/mafintosh/stream-shift.git"
- },
- "author": "Mathias Buus (@mafintosh)",
- "license": "MIT",
- "bugs": {
- "url": "https://github.com/mafintosh/stream-shift/issues"
- },
- "homepage": "https://github.com/mafintosh/stream-shift"
-}
diff --git a/node_modules/stream-shift/test.js b/node_modules/stream-shift/test.js
deleted file mode 100644
index bf4ed668..00000000
--- a/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.from('hello'))
- t.same(shift(passthrough), Buffer.from('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.from('hello'))
- t.same(shift(passthrough), Buffer.from('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()
-})