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.
- Host: GitHub
- URL: https://github.com/mitica/elementar
- Owner: mitica
- Created: 2017-12-28T17:39:45.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-31T10:13:22.000Z (over 8 years ago)
- Last Synced: 2025-10-03T12:55:50.581Z (8 months ago)
- Topics: elementar, html, html-simplifier, simplifier
- Language: TypeScript
- Size: 56.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.