An open API service indexing awesome lists of open source software.

https://github.com/mitica/elementar

Elementar is a content-oriented HTML simplifier.
https://github.com/mitica/elementar

elementar html html-simplifier simplifier

Last synced: about 1 month ago
JSON representation

Elementar is a content-oriented HTML simplifier.

Awesome Lists containing this project

README

          

# elementar

**Elementar** is a content-oriented HTML simplifier.

## Usage

```js
import { fromHtml } from 'elementar';

const elementar = fromHtml('

Here is the answer!

');
console.log(elementar.html()) //

Here is the answer!


console.log(elementar.xml()) //

Here is the answer!


console.log(elementar.text()) // Here is the answer!

```

## API

### fromHtml(html: string, options?: ElementarOptions): Elementar

See [options](src/options.ts).

### Elementar

### .html(): string

Returns the processed html.

### .xml(): string

Returns the processed html as xml.

### .text(): string

Returns the text from html.