Xtreamer Playground

node v8.17.0
version: 1.0.0
endpointsharetweet
const request = require("request"); const xtreamer = require("xtreamer"); const node = "course"; const url = "https://raw.githubusercontent.com/manojc/xtagger/gh-pages/demo/1mb.xml"; let count = 0; const xtreamerTransform = xtreamer(node) .on("data", (xmlNode) => ++count % 1000 || console.log(count)) .on("end", () => { console.log(`Nodes processed - ${count}`) }) .on("error", (error) => console.error(error)); request.get(url).pipe(xtreamerTransform);
Loading…

no comments

    sign in to comment