1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 17:59:55 +02:00
Oinktube/node_modules/write-stream/array.js
2022-07-15 11:08:01 -03:00

21 lines
352 B
JavaScript

var to = require("./index")
module.exports = toArray
function toArray(array, end) {
if (typeof array === "function") {
end = array
array = []
}
return to(writeArray, endArray)
function writeArray(chunk) {
array.push(chunk)
}
function endArray() {
end(array)
this.emit("end")
}
}