Linux web-conference.aiou.edu.pk 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64
Apache/2.4.41 (Ubuntu)
: 172.16.50.247 | : 18.226.200.44
Cant Read [ /etc/named.conf ]
7.4.3-4ubuntu2.28
appadmin
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
BLACK DEFEND!
README
+ Create Folder
+ Create File
/
usr /
share /
doc /
node-parallel-transform /
[ HOME SHELL ]
Name
Size
Permission
Action
README.md
1.39
KB
-rw-r--r--
changelog.Debian.gz
386
B
-rw-r--r--
copyright
1.44
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : README.md
# parallel-transform [Transform stream](http://nodejs.org/api/stream.html#stream_class_stream_transform_1) for Node.js that allows you to run your transforms in parallel without changing the order of the output. npm install parallel-transform It is easy to use ``` js var transform = require('parallel-transform'); var stream = transform(10, function(data, callback) { // 10 is the parallism level setTimeout(function() { callback(null, data); }, Math.random() * 1000); }); for (var i = 0; i < 10; i++) { stream.write(''+i); } stream.end(); stream.on('data', function(data) { console.log(data); // prints 0,1,2,... }); stream.on('end', function() { console.log('stream has ended'); }); ``` If you run the above example you'll notice that it runs in parallel (does not take ~1 second between each print) and that the order is preserved ## Stream options All transforms are Node 0.10 streams. Per default they are created with the options `{objectMode:true}`. If you want to use your own stream options pass them as the second parameter ``` js var stream = transform(10, {objectMode:false}, function(data, callback) { // data is now a buffer callback(null, data); }); fs.createReadStream('filename').pipe(stream).pipe(process.stdout); ``` ### Unordered Passing the option `{ordered:false}` will output the data as soon as it's processed by a transform, without waiting to respect the order. ## License MIT
Close