update, text, response
This commit is contained in:
23
node_modules/stream-shift/.github/workflows/test.yml
generated
vendored
Normal file
23
node_modules/stream-shift/.github/workflows/test.yml
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
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
|
||||
6
node_modules/stream-shift/.travis.yml
generated
vendored
6
node_modules/stream-shift/.travis.yml
generated
vendored
@@ -1,6 +0,0 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- "0.10"
|
||||
- "0.12"
|
||||
- "4"
|
||||
- "6"
|
||||
5
node_modules/stream-shift/index.js
generated
vendored
5
node_modules/stream-shift/index.js
generated
vendored
@@ -8,12 +8,13 @@ function shift (stream) {
|
||||
|
||||
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.buffer[0].length
|
||||
}
|
||||
|
||||
return state.length
|
||||
|
||||
2
node_modules/stream-shift/package.json
generated
vendored
2
node_modules/stream-shift/package.json
generated
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "stream-shift",
|
||||
"version": "1.0.1",
|
||||
"version": "1.0.3",
|
||||
"description": "Returns the next buffer/object in a stream's readable queue",
|
||||
"main": "index.js",
|
||||
"dependencies": {},
|
||||
|
||||
8
node_modules/stream-shift/test.js
generated
vendored
8
node_modules/stream-shift/test.js
generated
vendored
@@ -9,8 +9,8 @@ tape('shifts next', function (t) {
|
||||
passthrough.write('hello')
|
||||
passthrough.write('world')
|
||||
|
||||
t.same(shift(passthrough), Buffer('hello'))
|
||||
t.same(shift(passthrough), Buffer('world'))
|
||||
t.same(shift(passthrough), Buffer.from('hello'))
|
||||
t.same(shift(passthrough), Buffer.from('world'))
|
||||
t.end()
|
||||
})
|
||||
|
||||
@@ -20,8 +20,8 @@ tape('shifts next with core', function (t) {
|
||||
passthrough.write('hello')
|
||||
passthrough.write('world')
|
||||
|
||||
t.same(shift(passthrough), Buffer('hello'))
|
||||
t.same(shift(passthrough), Buffer('world'))
|
||||
t.same(shift(passthrough), Buffer.from('hello'))
|
||||
t.same(shift(passthrough), Buffer.from('world'))
|
||||
t.end()
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user