Answer the question
In order to leave comments, you need to log in
How to understand how return works in a code example?
https://github.com/fent/node-ytdl-core
There is such code in the examples on that hub
ytdl(url, { filter: function(format) { return format.container === 'mp4'; } })
.pipe(fs.createWriteStream('vide.mp4'));
Answer the question
In order to leave comments, you need to log in
Let's format the code to make it easier to read:
// ...
{
filter: function(format) {
return format.container === 'mp4';
}
}
// ...
'str' === 'string' // false
'str' === 'str' // true
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question