Skip to content

Elementar is a content-oriented HTML simplifier.

Notifications You must be signed in to change notification settings

mitica/elementar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Elementar is a content-oriented HTML simplifier.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published