summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/tar/node_modules/minipass/bench/lib/extend-through2.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/tar/node_modules/minipass/bench/lib/extend-through2.js')
-rw-r--r--deps/npm/node_modules/tar/node_modules/minipass/bench/lib/extend-through2.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/deps/npm/node_modules/tar/node_modules/minipass/bench/lib/extend-through2.js b/deps/npm/node_modules/tar/node_modules/minipass/bench/lib/extend-through2.js
new file mode 100644
index 0000000000..6a021084c4
--- /dev/null
+++ b/deps/npm/node_modules/tar/node_modules/minipass/bench/lib/extend-through2.js
@@ -0,0 +1,12 @@
+'use strict'
+const through2 = require('through2')
+module.exports = function (opt) {
+ return opt.objectMode
+ ? through2.obj(func)
+ : through2(func)
+
+ function func (data, enc, done) {
+ this.push(data, enc)
+ done()
+ }
+}