PHP 8.2.30
Preview: index.js Size: 453 B
//usr/lib/node_modules/npm/node_modules/stream-shift/index.js

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
}

Directory Contents

Dirs: 0 × Files: 7

Name Size Perms Modified Actions
13 B lrw-r--r-- 2021-03-10 14:36:37
Edit Download
65 B lrw-r--r-- 2021-03-10 14:36:37
Edit Download
453 B lrw-r--r-- 2021-03-10 14:36:37
Edit Download
1.05 KB lrw-r--r-- 2021-03-10 14:36:37
Edit Download
1.44 KB lrw-r--r-- 2021-03-10 14:36:37
Edit Download
480 B lrw-r--r-- 2021-03-10 14:36:37
Edit Download
1.12 KB lrw-r--r-- 2021-03-10 14:36:37
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).