0.1.0 • Published 6 years ago

elementar v0.1.0

Weekly downloads
1
License
ISC
Repository
github
Last release
6 years ago

elementar

Elementar is a content-oriented HTML simplifier.

Usage

import { fromHtml } from 'elementar';

const elementar = fromHtml('<p><strong>Here</strong> is the <i>answer</i>!<span></span></p>');
console.log(elementar.html()) // <p>Here is the answer!</p>
console.log(elementar.xml()) // <p><text>Here is the answer!</text></p>
console.log(elementar.text()) // Here is the answer!

API

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

See options.

Elementar

.html(): string

Returns the processed html.

.xml(): string

Returns the processed html as xml.

.text(): string

Returns the text from html.

0.1.0

6 years ago

0.0.1

6 years ago