UNPKG

321 BJavaScriptView Raw
1var fs = require('fs');
2
3var cssax = require('../cssax');
4
5var stream = cssax.createStream();
6stream.query('td.title ~ td ~ td.title > a').on('match', function (tag, attributes) {
7 this.readText(function (text) {
8 console.log(JSON.stringify(text));
9 });
10});
11
12fs.createReadStream(__dirname + '/hn.html').pipe(stream);
\No newline at end of file