Created
November 22, 2014 18:04
-
-
Save myndzi/4696fcbb985a74e81795 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var Rx = require('rx'), | |
PassThrough = require('stream').PassThrough; | |
var helpers = require('./helpers'); | |
var pt = new PassThrough(); | |
var select = require('./rx-select'); | |
var foo = select(':nth-child(2) a:not([keke=lar])', pt); | |
foo.subscribe(function (r) { | |
console.log(r); | |
}); | |
pt.write( | |
'<HTML><BODY><DIV>'+ | |
'<ul>'+ | |
'<li><a href="one">one</a></li>'+ | |
'<li><a keke="baz" href="two">two</a></li>'+ | |
'<li><a h' | |
); | |
pt.write('ref="three">three</a></li>'+ | |
'</ul>'+ | |
'<ul>'+ | |
'<li><a href="four">four</a></li>'+ | |
'<li><a keke="lar" href="five">five</a></li>'+ | |
'<li><a href="six">six</a></li>'+ | |
'</ul>'+ | |
'</DIV></BODY></HTML>' | |
); | |
pt = new PassThrough(); | |
foo = select(':nth-child(2) a:not([keke=lar])', pt); | |
foo.subscribe(function (r) { | |
console.log(r); | |
}); | |
pt.write( | |
'<HTML><BODY><DIV>'+ | |
'<ul>'+ | |
'<li><a href="one">one</a></li>'+ | |
'<li><a keke="baz" href="two">two</a></li>'+ | |
'<li><a h' | |
); | |
pt.write('ref="three">three</a></li>'+ | |
'</ul>'+ | |
'<ul>'+ | |
'<li><a href="four">four</a></li>'+ | |
'<li><a keke="lar" href="five">five</a></li>'+ | |
'<li><a href="six">six</a></li>'+ | |
'</ul>'+ | |
'</DIV></BODY></HTML>' | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment