Closed LorenzBischof closed 9 years ago
hi, latest version doesn't depend on external libraries, just removed it, let me know if it works or you need something else.
thanks for reporting!
works thanks!
How would I use the latest version in node without external libraries? It fails when trying to access document.
no idea, I don't use nodejs, do you know a way to make it work? maybe some shim for the document object or something?
yeah. something like domjs or cheerio. I'll try using cheerio since it's lighter than domjs and report back so you can add it in the documentation.
Got it working with jsdom. I had to use an older version because we don't use node 4.0 in production yet. I used v3.1.2 but a newer version might also work and if you have node 4.0 then the newest version should also work. Just declare document before using json.human.js: document = jsdom.jsdom(); Make sure you don't add "var" because then it wont work.
I would love to use cheerio but I couldn't find out how to access the document...
Could you please update the jsdom version? I can't install with npm because it throws an error. Newer jsdom versions don't require contextify anymore.