Getting Started
Install and run PureHTML across TypeScript, Go, Python, Java, and Ruby.
Installation & Usage
PureHTML is supported across multiple languages. Choose your runtime below:
Installation
npm install @purescraps/purehtml
# or
pnpm add @purescraps/purehtml
# or
yarn add @purescraps/purehtmlUsage
import { ConfigFactory, extract } from '@purescraps/purehtml';
const input = `<div>
<p>foo</p>
<p>bar</p>
<p>baz</p>
</div>`;
const config = ConfigFactory.fromYAML('selector: p');
const result = extract(input, config, 'https://example.com');
console.log(result);
// => "foo"