PHP 8.3.31
Preview: passthrough.js Size: 1.71 KB
/opt/alt/alt-nodejs19/root/lib/node_modules/npm/node_modules/readable-stream/lib/internal/streams/passthrough.js

// Copyright Joyent, Inc. and other Node contributors.
//
// 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.

// a passthrough stream.
// basically just the most minimal sort of Transform stream.
// Every written chunk gets output as-is.

'use strict'

const { ObjectSetPrototypeOf } = require('../../ours/primordials')
module.exports = PassThrough
const Transform = require('./transform')
ObjectSetPrototypeOf(PassThrough.prototype, Transform.prototype)
ObjectSetPrototypeOf(PassThrough, Transform)
function PassThrough(options) {
  if (!(this instanceof PassThrough)) return new PassThrough(options)
  Transform.call(this, options)
}
PassThrough.prototype._transform = function (chunk, encoding, cb) {
  cb(null, chunk)
}

Directory Contents

Dirs: 0 × Files: 18

Name Size Perms Modified Actions
1.32 KB lrw-r--r-- 2023-12-06 18:07:52
Edit Download
3.77 KB lrw-r--r-- 2023-12-06 18:07:52
Edit Download
3.31 KB lrw-r--r-- 2023-12-06 18:07:52
Edit Download
6.61 KB lrw-r--r-- 2023-12-06 18:07:52
Edit Download
4.73 KB lrw-r--r-- 2023-12-06 18:07:52
Edit Download
8.89 KB lrw-r--r-- 2023-12-06 18:07:52
Edit Download
6.70 KB lrw-r--r-- 2023-12-06 18:07:52
Edit Download
2.54 KB lrw-r--r-- 2023-12-06 18:07:52
Edit Download
1.54 KB lrw-r--r-- 2023-12-06 18:07:52
Edit Download
2.83 KB lrw-r--r-- 2023-12-06 18:07:52
Edit Download
11.57 KB lrw-r--r-- 2023-12-06 18:07:52
Edit Download
1.71 KB lrw-r--r-- 2023-12-06 18:07:52
Edit Download
10.23 KB lrw-r--r-- 2023-12-06 18:07:52
Edit Download
39.85 KB lrw-r--r-- 2023-12-06 18:07:52
Edit Download
901 B lrw-r--r-- 2023-12-06 18:07:52
Edit Download
6.93 KB lrw-r--r-- 2023-12-06 18:07:52
Edit Download
9.81 KB lrw-r--r-- 2023-12-06 18:07:52
Edit Download
25.31 KB lrw-r--r-- 2023-12-06 18:07:52
Edit Download

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