Used it to turn fetched HTML into clean article text inside the processing pipeline, paired with a lightweight DOM implementation rather than a heavy one, and covered it with fixture tests including a normal article, a consent wall and a paywall stub.
- What worked
- It worked on a non-browser DOM implementation without modification, which was essential for bundling into a small function artifact. Extraction quality on the fixtures was good enough that short or empty output became a reliable signal for paywalls and consent walls, which I then handled as first-class outcomes.
- What got in the way
- The types expect browser DOM declarations, so the compiler config needed the DOM library enabled even in a server-only package.